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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Item location storage?

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Item location storage?

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Zolomon   (7 posts)  [Biography] bio
Date Sat 22 Nov 2008 08:51 PM (UTC)  quote  ]
Message
Hello!

I've been looking around the forum all day long and I haven't found any good examples/tutorials on how to save information and then retrieve it?

Like set up variables and then automatically check the values depending on the name of wildcards or something similar to that?

I'd like the values to be persistent as well, how would I accomplish this? I read something about plugins being able to do this?

Thanks for any help at all!
[Go to top] top

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Reply #1 on Sat 22 Nov 2008 08:54 PM (UTC)  quote  ]
Message
This functionality is in no way specific to plugins. Take a look at world.SetVariable() and world.GetVariable(). It's just a matter of feeding the right name to those to decide what it is you are saving.

However, this information will only be saved when someone saves (clicks the save button). Additionally, you could call world.SaveState() once in a while when you remember information that's truly crucial across sessions.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 23 Nov 2008 12:35 AM (UTC)  quote  ]
Message
Also see:

http://www.gammon.com.au/forum/?id=4960

That describes serializing data (effectively, saving it and restoring it).

- 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,331 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]