Usually I get the inventory and stats to save. However location has never worked for me.
Mob
Login()
icon='Player.dmi'
icon_state= "Female"
var/mob/M //m = mob
for(M)
if(M.key)
world << "[M.name] has logged in."
// usr<<browse(Rules,"window=Rules;size=500x500")
Rules()
Damagecheck()
NewCharacterSkillReset()
spawn Regen()
spawn Regencheck()
var/savefile/F = new(ckey)
Read(F)
return ..()
var {saved_x; saved_y; saved_z}
//load coordinates
F >> saved_x
F >> saved_y
F >> saved_z
//restore variables
..()
//restore coordinates
Move(locate(saved_x,saved_y,saved_z))
mob/Logout()
var/savefile/F = new(ckey)
Write(F)
del(src)
//store coordinates
F << x
F << y
F << z
//store variables
..()
Yea I know messy. This is literally taken from my raw code. If someone has a working example I can adapt from and learn from, that would be great.