ID:264701
 
Code:
mob
proc
Save()
var/savefile/S = new("Saves/[usr.ckey]")
S["last_x"] << usr.x
S["last_y"] << usr.y
S["last_z"] << usr.z
Write(S)
Load()
if(fexists("Saves/[src.ckey]"))
var/savefile/S = new("Saves/[usr.ckey]")
S["last_x"] >> usr.x
S["last_y"] >> usr.y
S["last_z"] >> usr.z
Read(S)
usr.loc=locate(usr.x,usr.y,usr.z)
else
usr << "No savefile detected."


Problem description:
BYOND Error:(Sfile.cpp,1193) failed to open file:
BYOND Error:(Sfile.cpp,1193) C:\Users\Gebruiker\Downloads\MyDbz\DBZ\Saves\
proc name: Save (/mob/proc/Save)
source file: Backup.dm,31
usr: Crakenguy (/mob/player)
src: Crakenguy (/mob/player)
call stack:
Crakenguy (/mob/player): Save()
Crakenguy (/mob/player): Logout()
Darker Legends (/mob/player): Load()
Load (10,233,11) (/turf/TitleButtions/Load): DblClick(Load (10,233,11) (/turf/TitleButtions/Load), "mapwindow.map", "icon-x=4;icon-y=32;left=1;scre...")

"Failed to open file" means it's most likely an issue with your OS not allowing the file to be opened for whatever reason.

Additionally, you are saving/loading wrong. The proper way to do it is so:

client
proc
Save()
var/savefile/F = new("[ckey].sav")
F["mob"] << mob
Load()
if(fexists("[ckey].sav"))
var/savefile/F = new("[ckey].sav")
F["mob"] >> mob

New()
Load()
..()
Del()
Save()
..()

mob
Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
loc = locate(F["x"], F["y"], F["z"])


Calling Read() and Write() directly will result in mangled savefiles.

<edit> Whoops, misread the error. The mob's ckey is no longer valid after Logout(), so you are trying to open the file "".