ID:150299
 
Here is the code I use for it to put people in the place they were last time they were in the game. It does this at login, but for some reason most of the time they get a black screen, and when i try to get my coords it tells me nowhere.heres the code:


Write(savefile/F)
..()
if (world.maxx)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
Read(savefile/F)
..()
if (world.maxx)
var/last_x = 1
var/last_y = 1
var/last_z = 1
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
..()

Could anyone tell me why it takes people to nowhere?

</<></<></<>
Could anyone tell me why it takes people to nowhere?

If they don't have a savefile, F["last_x"], etc., will give you null returns.