mob
icon = 'Player.dmi'
mob
Login()
if(fexists("Saves/[src.ckey]")) // Looks for written save file and if it exists it allows acces to load
var/savefile/S = new("Saves/[src.ckey]") //opens the old save file
Read(S) //Reads it
S["last_x"] >> src.x //Loads the last X Coordinate
S["last_y"] >> src.y //Loads the last Y Coordinate
S["last_z"] >> src.z //Loads the last Z Coordinate
S["icon"] >> src.icon
else
src.loc = locate(86, 125, 1)
..()
mob
proc
Save() //Save procedure
var/savefile/S = new("Saves/[src.ckey]") //Creates a new save of your last saved character
S["last_x"] << src.x //stores last X coordinate
S["last_y"] << src.y //stores last Y coordinate
S["last_z"] << src.z //stores last Z coordinate
S["icon"] << src.icon
Write(S) // Writes the stored files into one
verb //
Save_Player()
src<<"Saving..."
Save()
sleep(10)
src<<"Saved..."
Problem description:
For some reason, when someone saves and then relogs, the icon vanishes and their walking about without an icon.