ID:142107
 
Code:
mob
proc
Save() //this works but gotta figure out how to save location too
if(src.x==9&&src.y==42&&src.z==1)
return // no saving at title_screen
src.saveAllOverlays()
F = new("/players/[src.ckey].sav")//"/players/[usr.ckey].sav")
src.last_x = src.x
src.last_y = src.y
src.last_z = src.z
F["mob"] << src
F["last_x"] << src.last_x
F["last_y"] << src.last_y
F["last_z"] << src.last_z
src << "You're progress has been saved.[F]"
Load()
if(fexists("/players/[src.ckey].sav"))
F = new("/players/[src.ckey].sav")
F["mob"] >> src
F["last_x"] >> src.last_x
F["last_y"] >> src.last_y
F["last_z"] >> src.last_z
src.loc = locate(src.last_x, src.last_y, src.last_z) // locate the user where they last were
src << "Welcome back [usr.handle]."
src.loadAllSaved()
else
src << "There are currently no saved files with your information."
return
verb/save()
src.Save()
//src.reloadOverlays()


Problem description:Alright now for some reason everything works great the first time. All vars, lists ... everything saves. But the second time, the lists and the variables don't save correctly. The only thing that saves correctly is my location.

Like say I save the first time in a location with my items on. Well everything is saved perfect and loads back up just fine. But once I restart after the load and say I wanna take off my items and my overlays are removed, I try saving then and that doesn't work and neither does items vars like the added on strength. It's like the only thing that saved was my location, but the lists didn't and neither did the items vars associated with the clothing.

I'm guessing that my issue is something called a rollback? Why would it be rolling back?