ID:140644
 
Code:
mob
proc
load()
if(fexists("players/[src.key].sav"))
var/savefile/F = new("players/[src.key].sav")
F >> src
..()
(var/savefile/F)
..()
//any special processing that needs to be done for writing, IE:
F["x"] >> src.x
F["y"] >> src.y
F["z"] >> src.z
..()
//complement to whatever is in Write()
loc = locate(F["x"], F["y"], F["z"])


Problem description:
runtime error: bad savefile or list
proc name: load (/mob/proc/load)
source file: Login.dm,28
usr: Xorbah (/mob)
src: Xorbah (/mob)
call stack:
Xorbah (/mob): load()
the load (13,3,1) (/turf/load): Click(the load (13,3,1) (/turf/load), "default.map1", "icon-x=21;icon-y=30;left=1;scr...")

Any help here, guys? Thanks in advance!

By the way, Line 22 is this: F["x"] >> src.x
Xorbah wrote:
Code:
>           (var/savefile/F)


Mind explaining that line? Also you'll want to initialize your savefile; you can't load from null.
At this point, I'm going to suggest you stop throwing random crap at your .dm files and start actually reading how to write code.

http://www.byond.com/docs/guide/
http://www.byond.com/docs/ref/info.html#/proc/@dt;@dt;
http://www.byond.com/docs/ref/info.html#/savefile
In response to Kuraudo
Kuraudo wrote:
Xorbah wrote:
Code:
> >             (var/savefile/F)

Mind explaining that line? Also you'll want to initialize your savefile; you can't load from null.

That line basically nullifies his previously defined savefile F, probably causing the error.
In response to Nielz
Nielz wrote:
That line basically nullifies his previously defined savefile F, probably causing the error.

His previously defined F exists in a different block and so would have already been freed; therefore, no it doesn't.