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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ Reload Script File on re-connecting to world

Reload Script File on re-connecting to world

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


Posted by Seriley   (42 posts)  Bio
Date Fri 26 Nov 2010 08:47 AM (UTC)
Message
The script file is loaded automatically when I open the world the first time. But not on a re-connect.

Is there a way to reload the script file on each re-connect besides using the Shift-Ctrl-R keyboard entry or clicking on the button provided?

Thanks
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 26 Nov 2010 09:59 AM (UTC)
Message
In the scripts configuration window are some boxes. One is: World Events -> Connect.

Put in there the name of a function you want to have run when the world connects.

I presume you don't really need to reload the script, but rather that you need to re-initialize variables. Well, do that in the connect function.

- Nick Gammon

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

Posted by Seriley   (42 posts)  Bio
Date Reply #2 on Fri 26 Nov 2010 05:07 PM (UTC)
Message
Thanks, Nick.

I hadn't thought of having all variable initialization in a function instead of just reloading the script file.
The northeastern lights you are seeing in the skies is me blushing.
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.


12,530 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.