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 ➜ Tips and tricks ➜ Why can't I run code on world close?

Why can't I run code on world close?

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


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Wed 06 Nov 2002 03:26 PM (UTC)
Message
I tried to run some code to save an array into variables, but it won't work. When i run it manually, or even on world_disconnect, it works fine. Just not on world_close. What's wrong?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #1 on Wed 06 Nov 2002 05:48 PM (UTC)
Message
You are talking about your main world's script file, not a plugin, correct?

Have you configured the subroutine to call in your "World Details | Scripting" configuration?

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Wed 06 Nov 2002 08:07 PM (UTC)
Message
Yes, i have, and it does nothing... The OnPluginClose works perfectly though, which is what i needed it for. I wrote a plugin to log equipment damage, and it's ready, apart from the help file and the MUSHClient crash when i try to color text.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 07 Nov 2002 01:57 AM (UTC)
Message
The world close script is executed after the world is saved, thus moving things to variables then is too late.

However in a plugin use OnPluginSaveState to do that before the plugin's state is saved.

- Nick Gammon

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

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Thu 07 Nov 2002 11:47 AM (UTC)
Message
OK, I did that and it works now :)

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
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.


15,911 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.