Load()
if(src.mob.savefile1)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 1.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
src<<"Account loaded. [src.mob], [src.mob.x], [src.mob.x], [src.mob.z]"
if(src.mob.savefile2)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 2.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
src<<"Account loaded. [src.mob], [src.mob.x], [src.mob.x], [src.mob.z]"
if(src.mob.savefile3)
var/savefile/load
load = new ("Player Saves/[mob.ckey]/Save File 3.sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
src<<"Account loaded. [src.mob], [src.mob.x], [src.mob.x], [src.mob.z]"
Save()
if(!src)return
if(!src.mob)return
if(src.mob.savefile1)
var/savefile/save
save = new ("Player Saves/[mob.ckey]/Save File 1.sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
src<<"Successfully saved to slot 1"
if(src.mob.savefile2)
var/savefile/save
save = new ("Player Saves/[mob.ckey]/Save File 2.sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
src<<"Successfully saved to slot 1"
if(src.mob.savefile3)
var/savefile/save
save = new ("Player Saves/[mob.ckey]/Save File 3.sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
src<<"Successfully saved to slot 1"
Problem description:
It seems like the character is saving because when I load it up, I've set it to show me the some variables of the loaded character and they seem just about right. The only problem is that my character isn't appearing at his saved (x,y,z) coordinates.
And you have to set it using a locate(), setting each coordinate separately doesn't work if your location is null.