ID:270564
 
mob
icon='Smile.dmi'

Login()
src<<"Loading your savefile..."
Load()
..()

Load()
var/savefile/F = new(client.Import())
if(F)
F["last_x"] >> src.x
F["last_y"] >> src.y
F["last_z"] >> src.z
F["Health"] >> src.Health


Ok for some reason it will not load my x,y,z plese help me figure out why.
Hope Load() is under mob/proc and not under Login()... >.>

- GhostAnime
Do you write x, y, and z into the savefile when you save the mob?
In response to Jp
yes i do JP

mob
icon='Smile.dmi'

Login()
src<<"Loading your savefile..."
Load()
..()
proc
Save()
var/savefile/F = new()
F["last_x"] << src.x
F["last_y"] << src.y
F["last_z"] << src.z
F["Health"] << src.Health
src.client.Export(F)


Load()
var/savefile/F = new(client.Import())
if(F)
F["last_x"] >> src.x
F["last_y"] >> src.y
F["last_z"] >> src.z
F["Health"] >> src.Health




verb
Save_Player()
src<<"Saving [src]..."
Save()
sleep(10)
src<<"Saved."