ID:1951845
 
Code:
runtime error: bad output
proc name: Save (/mob/proc/Save)
source file: (0.6.0) Mob Saving.dm,29
usr: Test No. 1 (/mob)
src: Test No. 1 (/mob)
call stack:
Test No. 1 (/mob): Save()
Test No. 1 (/mob): Auto Save()
Test No. 1 (/mob): New Or Load()
Test No. 1 (/mob): Login()


Problem description:
This is what it says when I make an Auto_Save, I don't understand the reason why it does this. Below, is the coding that, I've used for the save system.( Additional Information: Sometimes the X-Location, will be automatically stored or made into 1 although they may actually have a value that was suppose to be saved; I don't know how to solve it since its been going on for awhile. Maybe, its a problem with the map. Please do inform me if so. )

mob/proc
Save()
if(!key||!Player) return
var/savefile/S=new("Save/[key].sav")
S["savedx"]<<x
S["savedy"]<<y
S["savedz"]<<z
Write(S)
Load()
if(fexists("Save/[key].sav"))
var/savefile/S=new("Save/[key].sav")
Read(S)
var/loadx, loady, loadz
S["savedx"] >> loadx
S["savedy"] >> loady
S["savedz"] >> loadz
loc = locate(loadx, loady, loadz)
Player =1
spawn Stats()
Auto_Save()
else
alert("You do not have any characters on this server.")
New_Or_Load()