client
Del()
..()
src.mob.SaveC()
mob
Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
var/x
var/y
var/z
F["x"] >> x
F["y"] >> y
F["z"] >> z
loc = locate(x,y,z)
mob/var/tmp/cansave=0
mob
proc
SaveC()
if(src.cansave)
var/savefile/F=new("players/[src.key].sav")
Write(F)
verb
load()
if(fexists("players/[usr.key].sav"))
var/savefile/F=new("players/[usr.key].sav")
Read(F)
usr.cansave=1
else
alert("You don't have a savefile!")
delete()
if(fexists("players/[usr.key].sav"))
var/conf=input("Are you sure you want to delete your savefile?")in list("Yes","No")
if(conf=="Yes")
fdel("players/[usr.key].sav")
else
alert("You don't have a savefile!")
newun()
if(fexists("players/[usr.key].sav"))
alert("Delete your old savefile first!")
return
usr.loc=locate(21,21,1)
winset(usr, "default", "is-visible=false")
winset(usr, "game", "is-visible=true")
usr.cansave=1
Problem description:
It's been a while since I last coded a project, so I'm a bit rusty. I found an old save/load demo I used a lot back when I coded a lot, but this time, it doesn't seem to save a savefile when I logout. Why...?