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 ➜ Plugins ➜ Plugin State Files.

Plugin State Files.

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


Posted by Falgor   (36 posts)  Bio
Date Fri 10 Feb 2017 07:06 PM (UTC)
Message
I'm currently playing around with the mapper, trying to tweak it to work with MUDs with multiple same named rooms with the same exits (going down the route of giving every 'room' it's own ID, and making a room by moving in a direction, not waiting for a capturing trigger to fire. Then just enabling/disabling a "writing" mode.)

Anyway!

I'm doing so much trial and error I'd like to see how to delete my Mapper Plugin's state file, or at least clear tables within it. I've tried removing the tables in immediate, and in the plugin itself, yet every time I load MUSHclient my own rooms are saved.


I've tried


rooms = nil
config = nil
unvar rooms
unvar config


Inside the plugin itself, this should delete the saved data even after it has been serialized.

Thanks.

F.
Top

Posted by Nick Gammon   Australia  (23,131 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 10 Feb 2017 09:24 PM (UTC)
Message
One approach is to open the state file. Right double-click the plugin in the plugin list. That opens the state file in your preferred editor. Then close the world (that saves the state file).

Now use your editor to delete the variables in it, and then save the state file. Now when you re-open the world the variables are gone.

Alternatively, make a note of the state file name (using the above technique of RH-double-clicking it. Close the world. Delete the state file in the file explorer.

I think you will find that the client opens the plugin and runs the script (this creates functions and runs any code at global scope). Then it loads the state file. Then it calls OnPluginInstall() function. Thus, deleting variables by code in global scope won't do it (it is run too early). You could do it in OnPluginInstall().

Probably the simplest thing, while testing, is just to make an alias (in the plugin) that resets or deletes any variables you want deleted.

- 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.


10,516 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.