Saving Character Names in Developer Help
|
|
mob/proc/saveName() var/savefile/R = new("save/[key].sav") R["NameSave"]<<NameSave ..() mob/proc/loadName() if(fexists("save/[key].sav")) var/savefile/R = new("save/[key].sav") R["[usr.name]"]<<NameSave usr.name="[usr.name].sav" ..()
|
This is what I have to save and load, not even sure if this works, but I need it so that it will ask the player to input their name only if they haven't inputed their name before
|
notes
1: you will get yell'd at for having usr in a mob based proc
where src will work (this is because it can make issues later on)
2: I will get yell'd at for not fixing my post to use src
3: im not sure if the changed Load will work fully its only there as an example.
4: i use "[]" when setting the name even thou you could just have usr.name = NameSave (thats just something I do please change it)