mob
proc
save()
var/savefile/F = new("Saves/[usr.ckey].sav")
sleep(1)
F["name"] << usr.name
F["iconstate"] << usr.icon_state
F["previcon"] << usr.previcon
F["firelvl"] << usr.firelvl
F["waterlvl"] << usr.waterlvl
F["earthlvl"] << usr.earthlvl
F["airlvl"] << usr.airlvl
F["fireexp"] << usr.fireexp
F["waterexp"] << usr.waterexp
F["earthexp"] << usr.earthexp
F["airexp"] << usr.airexp
F["firemexp"] << usr.firemexp
F["watermexp"] << usr.watermexp
F["earthmexp"] << usr.earthmexp
F["airmexp"] << usr.airmexp
F["hp"] << usr.hp
F["mhp"] << usr.mhp
F["mp"] << usr.mp
F["mmp"] << usr.mmp
F["completedquests"] << usr.completedquests
F["items"] << usr.contents
F["gold"] << usr.gold
F["itembank"] << usr.itembank
F["goldbank"] << usr.goldbank
F["x"] << usr.x
F["y"] << usr.y
F["z"] << usr.z
F["icon"] << usr.icon
Write(F)
usr<<"Saved"
sleep(1200)
usr.save()
Problem description:
When I Chose to load the game, most of the vars return as null, not 0. I looked at the savefile via savefile editor and it turns out the vars that are returning null aren't being saved to the file.. any1 have any ideas??
Why are you saving variables like that AND using Write()? Write() automatically saves all non-tmp blah blah variables. Look it up in the reference.
Also just to clarify, I'm assuming you're actually calling that proc somewhere.