[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Plugin State Files.
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Plugin State Files.

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


Posted by Falgor   (21 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] 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.


1,270 views.

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

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]