mob/verb/Load()
set hidden = 1
if(usr.login)return 0
if(usr.creating)return 0
usr.creating=1
if(fexists("players/[usr.ckey]/[usr.ckey].sav"))
usr.creating=0
if(usr.login)return
var/savefile/F = new("players/[usr.ckey]/[usr.ckey].sav")
if(usr.creating)return
Read(F)
sleep(1)
usr.move=0
usr.Stuff()
else
usr<<"No savefile found on this server!"
usr.creating=0
Code: Save
mob/verb/Save()
set hidden=1
if(src.login)
src<<"Character Saved!"
var/savefile/F = new("players/[usr.ckey]/[usr.ckey].sav")
src.savefile1=1
Write(F)
Problem description:
Ok well...there isnt a problem with the programming its self as in if it will or wont work, however, it does tend to burp from time to time with causing 2 things to happen...1 can be that the players save is there, however it loads but all the Vars are changed to null (Not sure if this is 100 percent true, but it appears this way), and 2, that the Players save isnt even found :/ Also, know that this is the same Save/Load system that the game Naruto Izou used to use (I understood that it does have a bit of a buggy background, so if someone has fixed this before, it would be helpfull ><)
Here's a little thing to make it 1 less line of coding :o
No longer need to see if(fexists(/*...*/)) after you move the var/savefile/F to a different spot ^-^