ID:148509
 
    New()
if(fexists("hiscores.txt"))
var/hifile = file("hiscores.txt")
var/numscore
hifile["numscore"] >> numscore
var/i
for(i=1, i<= numscore, i++)
var/hiScore/H
hifile["HS[i]"] >> H
hiscorelist.Add(H)

..()
Del()
if(fexists("hiscores.txt"))
fdel("hiscores.txt")
var/hifile = file("hiscores.txt")
hifile["numscore"] << hiscorelist.len
var/i = 1
for(var/hiScore/H in hiscorelist)
hifile["HS[i]"] << H
i++
..()


But I get a runtime... a bad savefile/list O_o?
Nova2000 wrote:
But I get a runtime... a bad savefile/list O_o?

That's a rather nondescript description of your error. Think you can be a little more specific?

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Nova2000 wrote:
But I get a runtime... a bad savefile/list O_o?

That's a rather nondescript description of your error. Think you can be a little more specific?

Lummox JR

Huh? I can try...
runtime error: bad savefile or list
proc name: Del (/world/Del)
source file: global.dm,99
usr: null
src:
call stack:
: Del()


Line 99 is: hifile["numscore"] << hiscorelist.len

EDIT: While paging through the demos, I found my problem. I need to var/savefile it and have a new("file")

It works now, thanks