Gammon Forum
Entire forum
MUSHclient
Plugins
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 (22,975 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.
9,589 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.