ID:262949
 
Code:
mob
proc
Load()
var/savefile/client_file = new(client.Import())
if(client_file)
var/last_x
var/last_y
var/last_z
client_file["usr"] >> src
client_file["last_x"] >> last_x
client_file["last_y"] >> last_y
client_file["last_z"] >> last_z
var/destination = locate(last_x, last_y, last_z)
loc = destination


Problem description:it wont locate me to my saved spot how can i fix this

Just do this:

                ... //put the other stuff here
client_file["last_x"] >> last_x
client_file["last_y"] >> last_y
client_file["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
//This way you don't even have to CREATE the destination var!


That should work.
In response to KirbyRules
I prefer Deadron's method of doing it.

var/destination = locate( last_x, last_y, last_z )
if( !Move( destination ) )
loc = destination