if(fexists("players/[usr.key]"))
var/savefile/load = new ("players/[usr.key]")
var/mob/newmob = new()
var/X
var/Y
var/Z
load["mob"] >> newmob//It registers it right here
load["x"] >> X
load["y"] >> Y
load["z"] >> Z
//It goes through a hole thing of adding verbs and what ever else then I do the following.
newmob.client=src.client
For Saving I use the following code.
mob
proc
AutoSave()
if(src.cansave)
src.saveproc()
spawn(3000)
src.AutoSave()
proc
saveproc()
if(src.cansave)
var/savefile/save
save = new ("players/[src.key]")
save["mob"] << src
save["x"] << src.x
save["y"] << src.y
save["z"] << src.z
src<<"Your Game has been saved!"
Problem description:
runtime error: bad savefile or list
proc name: load (/mob/proc/load)
source file: Login.dm,28
usr: King killer 113711 (/mob)
src: King killer 113711 (/mob)
call stack:
King killer 113711 (/mob): load()
the load (11,7,1) (/turf/load): Click(the load (11,7,1) (/turf/load), "mapwindow.map", "icon-x=1;icon-y=19;left=1")
King killer 113711 (/mob): load()
the load (11,7,1) (/turf/load): Click(the load (11,7,1) (/turf/load), "mapwindow.map", "icon-x=1;icon-y=19;left=1")
This runtime error is given when I click the load button.