Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ scripting engines and scripting variables

scripting engines and scripting variables

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Tspivey   Canada  (54 posts)  Bio
Date Sat 13 Aug 2005 03:20 AM (UTC)
Message
If I use a variable in a scripting language, say lua, without using the MushClient's variable interface,
will that variable last throughout my session only, or until the script engine is re-loaded, or until
the end of the current script? I don't need MC's variables to save there state, and
there interface is sort of clunky. How often will the engine reload and lose my variables?
sorry if this has been asked before, but I thought it would be important for other scripters.
Thanks,
Tspivey
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Sat 13 Aug 2005 06:34 AM (UTC)
Message
They will stay until you reload the scripting engine.

Which, will only happen each time your world is opened. Unless you have errors, then the script reloads (and if you change your script file, you have to reload to update the script). Of course, you can also reload manually.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 17 Aug 2005 07:24 AM (UTC)
Message
See the post linked below. If you use this method the Lua variables effectively become MUSHclient variables and would be saved when the plugin saves state.

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4904



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,820 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.