client
proc
Load_Mob()
if(fexists("Saves/[src.ckey].sav"))
var/savefile/Save = new("Saves/[src.ckey].sav")
var/mob/loaded_mob
Save["player"] >> loaded_mob
if(loaded_mob)
var
loaded_x = Save["player/X"]
loaded_y = Save["player/Y"]
loaded_z = Save["player/Z"]
loaded_mob.loc = locate(loaded_x,loaded_y,loaded_z)
var/mob/old_mob = src.mob
mob = loaded_mob
old_mob.loc = null
Problem description:
So here's what's happening, I'm working on the save/load system, I've got my character creation working in the way I want it to, but whenever I load a saved character I get a black screen with the null coordinates. If I remove the last three lines the code works, however it leaves behind an invisible mob from when the player was loading their character.
TL;DR Basically I'm trying to either get that invisible mob to be moved off the map, or to be deleted when loading in.
Could you show me your Save_Mob() proc?