mob/proc
Save()
src.Hash = md5("[src.x][src.y][src.z][src.Level][src.HP]") //we dont want to save them at the title screens!
var/savefile/S = new("GameFiles/Players/[src.key]/[src.key].sav") //creates a new savefile or overwrites an old one
S["LastX"]<<src.x //this saves a variable to the savefile, the << point at where youre sending the data
S["LastY"]<<src.y
S["LastZ"]<<src.z
S["Name"] << src:name
S["Char"]<<src.Char
S["Level"]<<src.Level
S["Experience"] << src.Exp
S["MaxExperience"] << src.MaxExp
S["Hp"] << src.HP
S["MaxHp"] << src.MaxHP
S["Ki"] << src.Ki
S["MaxKi"] << src.MaxKi
S["Str"] << src.Str
S["MaxStr"] << src.MaxStr
S["Def"] << src.Def
S["MaxDef"] << src.MaxDef
S["Zenni"] << src.Gold
S["NameColor"] <<src.NameColor
S["Seconds"] << src:seconds
S["Hours"] << src:hours
S["Days"] << src:days
S["Medals Not Earned"] << src.Medals
S["Medals Earned"] << src.MedalEarned
S["Form1"] << src.Form1
S["Form2"] << src.Form2
S["Form3"] << src.Form3
S["Form4"] << src.Form4
S["Form5"] << src.Form5
S["Fly"] << src.Fly
S["Hash"] << src.Hash
S["Clan"] << src.Clan
Write(S)
src<<"Game Saved"
Load()
if(fexists("GameFiles/Players/[src.key]/[src.key].sav"))
world<<"<b>[src] has joined us</b>"
var/savefile/S = new("GameFiles/Players/[src.key]/[src.key].sav")
var/LastX
var/LastY
var/LastZ
Read(S)
S["LastX"]>>LastX
S["LastY"]>>LastY
S["LastZ"]>>LastZ
S["Name"] >> src:name
S["Char"]>>src.Char
S["Level"]>>src.Level
S["Experience"] >> src.Exp
S["MaxExperience"] >> src.MaxExp
S["Hp"] >> src.HP
S["MaxHp"] >> src.MaxHP
S["Ki"] >> src.Ki
S["MaxKi"] >> src.MaxKi
S["Str"] >> src.Str
S["MaxStr"] >> src.MaxStr
S["Def"] >> src.Def
S["MaxDef"] >> src.MaxDef
S["Zenni"] >> src.Gold
S["NameColor"] >>src.NameColor
S["Seconds"] >> src:seconds
S["Hours"] >> src:hours
S["Days"] >> src:days
S["Medals Not Earned"] >> src.Medals
S["Medals Earned"] >> src.MedalEarned
S["Form1"] >> src.Form1
S["Form2"] >> src.Form2
S["Form3"] >> src.Form3
S["Form4"] >> src.Form4
S["Form5"] >> src.Form5
S["Fly"] >> src.Fly
S["Hash"] >> src.Hash
S["Clan"] >> src.Clan
src.loc=locate(LastX,LastY,LastZ)
src<<"Game Loaded"
src.CreateName()
if(!src.Char) src.Char="Goku";src.icon='goku.dmi'
src.Characters()
if(src.Hash == md5("[src.x][src.y][src.z][src.Level][src.HP]")) //checks if it's src.foo / src.bar * src.key
goto NEWLOC
else
usr<<"Your savefile has been deleted because someone has edited your save file."
fdel("GameFiles/Players/[src.key]/[src.key].sav")
src.Load()
NEWLOC
if(!src.loc)
src.loc=locate(/turf/Start)
return 1
else
world<<"<b>[src] has joined us for first time"
src.loc=locate(/turf/Start)
src.icon='goku.dmi'
src.CreateName(src.namecolor)
src.Medal_Earned(usr,"Player","Login To Game")
world<<"<b>[src] has joined us for first time"
return 0
Problem description:Load proc dont load all of the vars like if HP,EXP,KI etc