Logout()
src.Save()
world << output("[name]([src.ckey]) has logged out.", "output1")
del src
Load Proc:
Load()
set hidden=1
clicking=1
if(fexists("Saves/[src.ckey].sav"))
var/savefile/F=new("Saves/[src.ckey].sav")
Read(F)
src.loc=locate(F["xxx"],F["yyy"],F["zzz"])
winset(src, null, "mainwindow.is-visible=true;login.alpha=0")
Load_Stats()
winset(src,"stats.health","text=\"[Health]/[Max_Health]")
winset(src,"stats.stamina","text=\"[Stamina]/[Max_Stamina]")
winset(src,"stats.strength","text=\"[Strength]")
winset(src,"stats.speed","text=\"[Speed]")
winset(src,"stats.swordskill","text=\"[Sword_Skill]")
winset(src,"stats.level","text=\"[level]")
winset(src,"stats.sorcery","text=\"[Sorcery]")
winset(src,"stats.stat_points","text=\"[stat_points]")
winset(src,"stats.exp","text=\"[exp]/[mexp]")
winset(src,"inventory.Doubloons","text='[src.Doubloons]'")
world << output("[name] has logged in.", "output1")
src.BasicSkillProc()
src.FireSkillsProc()
usr.UpdateInv()
clicking=0
if(usr.key in list ("Micdogmic",""))
src.CreateMapText("<font color=\"#3BB9FF\">[src]</font><br>[src.Rank]")
return
if(usr.key in list ("AreYouScared"))
src.CreateMapText("<font color=\"#8D38C9\">[src]</font><br>[src.Rank]")
return
else
src.CreateMapText("[src]<br>[src.Rank]")
else
return
Save Proc:
proc
Save()
set hidden=1
var/savefile/F=new("Saves/[src.ckey].sav")
F["xxx"]=x
F["yyy"]=y
F["zzz"]=z
Write(F)
Reboot Proc:
mob/verb/Reboot()
if(usr.key in list ("Micdogmic","AreYouScared","Kidsparda"))
world.Reboot()
Problem description:Sometimes when a player will load a character on the server, it will reboot the server, and erase/rollback other players characters. Also, when I reboot the server, all savefiles will be deleted.
If you need any other codes, just ask.
I could go on, but I'll leave it there for now.
If I had to pick one of these as the most likely cause for save files not saving correctly, it would either be calling del src in Logout() rather than the default procedure or directly calling Read and Write.