ID:141669
 
mob
verb
Save()
set name = "Save"
usr.save()
usr << "Saved!"

proc
save()
var/savefile/F=new("saves/[name].sav")
Write(F)
load()
if(fexists("saves/[name].sav"))
var/savefile/F=new("saves/[name].sav")
Read(F)


That is my save proc and verb, but when I call the load() proc it loads nothing. I tested it by adding a:
usr << "[usr.name]"

And all it did was say: "Hi1" not the name I saved. Please help!
The problem is using name in the savefile. When saving it works fine and uses the new name ("saves/MyNewName.sav"), but when loading it's looking up your current name ("saves/Hi1.sav"). This is why most people will use keys (or ckey rather, to get rid of invalid filename characters) for the savefile name.
In response to YMIHere
Okay, thanks!