So, how would I save a list to a savefile?
My mobs have some vars that are lists.
Using server-side saving, all string/number variables are loaded correctly, but the lists are not --everytime I load my savefile, the list variables are empty.
Is there a way to save a mob's list to its savefile?
Thanks for reading,
Gooseheaded
P.S. If I was not clear, forgive me.
P.S.S. I've searched around the forums, but I havent found a thread with this topic. If there is one out there, please link me.
ID:161643
![]() Apr 14 2008, 1:43 pm
|
|
If your code saves mobs then it should save any lists attached to that mob as well as long as they arent "tmp" variables.
Mine save automatically I've never had a problem with it. |
Sorry for necroposting a bit here, but I'm having the same problem... I figured that the lists would save as regular variables, but they don't. Every time somebody relogs, it clears the list.
|
1) Is the variable defined as /tmp (ex: var/tmp/list/X)... if so, remove the /tmp - which makes that variable unsavable (which is useful when you are making references to temp. variables like freezing and mob reference [if a mob reference was saved, there's a huge chance of causing a "roll back" of that mob).
2) Check your save system, you may be accident saving it as null or overwriting it with no contents. |
http://www.byond.com/developer/Super16/OBJSAVING
Tell me if it doesn't work. I didn't test it out, but it sounded like what you were looking for.