Item location storage?

Posted by Zolomon on Sat 22 Nov 2008 08:51 PM — 3 posts, 15,777 views.

#0
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!
Netherlands #1
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.
Australia Forum Administrator #2
Also see:

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

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