mob/proc/SaveProc()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName)) fdel(FileName)
var/savefile/F=new(FileName)
F["Level"]<<src.lvl
F["Exp"]<<src.exp
F["Nexp"]<<src.expnd
F["HP"]<<src.life
F["MaxHP"]<<src.max_life
F["Str"]<<src.str
F["Def"]<<src.def
F["LastX"]<<src.x
F["LastY"]<<src.y
F["LastZ"]<<src.z
F["Race"]<<src.race
F["Class"]<<src.class
F["inventory"]<<src.contents
F["icon"]<<src.icon
src<<"Character Saved..."
mob/proc/LoadProc()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName))
var/savefile/F=new(FileName)
F["Level"]>>src.lvl
F["Exp"]>>src.exp
F["Nexp"]>>src.expnd
F["HP"]>>src.life
F["MaxHP"]>>src.max_life
F["Str"]>>src.str
F["Def"]>>src.def
F["Race"]>>src.race
F["Class"]>>src.class
F["inventory"]>>src.contents
F["icon"]>>src.icon
src.loc=locate(F["LastX"],F["LastY"],F["LastZ"])
src<<"Character Loaded..."
return 1
/* this is in my login() proc...*/
if("continue")
src.LoadProc()
world<<"[src] has Returned"
ok so when i save my character the icon of the player is not being saved proper thus causing my player to be invisible when continuing. what should i do??
Avoid saving icons into your savefiles.
The above should work properly.