ID:263935
 
I know I usally dont post things unless i cant get them period, and i need them.

So, I was wondering if anyone out there..could help me by making me and Auto Save Code. If you need my login code feel free to ask because i have no proeblem with giving it out..So plz help me anyone who can and I will try to reward you.

mob/proc/AutoSave()
while(src)
Save()
sleep(600)
mob/proc
Save()
var/savefile/F=new("Save/[key]")
F["x"]<<x
F["y"]<<y
F["z"]<<z
Write(F)
Load() if(client&&fexists("Save/[key]"))
var/savefile/F=new("Save/[key]")
Read(F)
F["x"]>>x
F["y"]>>y
F["z"]>>z
spawn AutoSave()
In response to Dragonn
saving...Undifinded var..just put mob/var/saving?
or does it need something special?
In response to Reno Kujika
Oh..I meant to remove that line. This is the code from my game I just removed all the unneccessary stuff but I must have left that in there. Look up there in about 10 seconds and itll be fixed

Also I put spawn Autosave() at the bottom of Load(), that way you dont have to put AutoSave anywhere else. If you do want to put it somewhere else make sure you only put it in one place, so remove where it is now if you do.

And I dont think you can copy and paste code from the forum because it treats tabs as spaces. You probably have to rewrite it, even though it sucks having to do that.
In response to Dragonn
i know and thanks for helping