mob
proc
Save()
fdel("savefile/[copytext(usr.ckey,1,2)]/[usr.ckey].trpgs")
var/savefile/F=new("savefile/[copytext(usr.ckey,1,2)]/[src.ckey].trpgs")
src.Write(F) // writes your variables/lists onto it
Load()
if(fexists("savefile/[copytext(usr.ckey,1,2)]/[usr.ckey].trpgs"))
var/savefile/F=new("savefile/[copytext(usr.ckey,1,2)]/[src.ckey].trpgs")
src.Read(F)
src.checkpoint()
else
usr << "No Save File"
return
Problem description:
This has happened on several different projects; and I'm certain it has absolutely nothing to do with the code, but with the content of the savefile. My problem is, when I have
with certain things in it (of what I'm not sure) saving goes really crappily; what I -think- is happening is that the login procedure is failing, so it is restarting (not sure why).
For instance: Randomly, when I log in, saving/loading works, but sometimes I log in, and I hit load, and it repeatedly asks me to load, bringing up some sort of runtime error each time I press load (the error is not the problem; it has been different everytime I have encountered this problem, it's usually something to do with bad client, or a variable being null due to a failure of loading vars). And it doesn't kick me out, and make me start over, I just stay, and Login() keeps repeating; it even places me back to my saved location, but continues to get very buggy, and spams my screen with runtimes.
Are there certain things you cannot have in a savefile, or else it will fail when reading? If so, what? Because I have encountered this in many projects.