ID:956048
 
Keywords: errors
Code:
runtime error: cannot append to list
proc name: Load (/mob/proc/Load)
source file: Save.dm,15
usr: Asterr Inuzuka (/mob)
src: Asterr Inuzuka (/mob)
call stack:
Asterr Inuzuka (/mob): Load()
Welcome (/obj/Welcome): Click(the turf (20,38,1) (/turf), "mapwindow.map", "icon-x=304;icon-y=84;left=1;sc...")


Problem description: This is the error I get when I try to load my game. It has something to do with my Inventory? I'm not sure what the problem is...

Could you show us the code for /mob/proc/Load()?
Load()
if(fexists("savefile/[usr.ckey].sav"))
var/savefile/F=new("savefile/[src.ckey].sav")
src.Read(F)
var/newX
var/newY
var/newZ
var/newverbs
F["lastx"] >> newX
F["lasty"] >> newY
F["lastz"] >> newZ
F["verbs"] >> newverbs
src.loc=locate(newX,newY,newZ)
src.verbs+=newverbs
return

Basic Load
In response to Asterr
You're calling Read() directly, it's called automaticly when using savefile[]>>datum. you use [usr.ckey] while checking for the savefile but [src.ckey] when saving/loading.

But through that, it appears the issue is src.verbs+=newverbs (which is a list). I guess you could attempt to use verbs=newverbs. Though I don't think that's right either.
In response to NNAAAAHH
NNAAAAHH wrote:
You're calling Read() directly, it's called automaticly when using savefile[]>>datum. you use [usr.ckey] while checking for the savefile but [src.ckey] when saving/loading.

But through that, it appears the issue is src.verbs+=newverbs (which is a list). I guess you could attempt to use verbs=newverbs. Though I don't think that's right either.

Well i've been using the same Save/Load Code for all several of my environments and have had no trouble. With Saving or Loading until this is in inventory:
    mob/Summon
Dog
name="Dog"
icon='Inuzuka.dmi'
icon_state="dog"
lvl=1
tai=100
bumping=0
density=1
verb
Get()
set src in oview(1)
if(src.owner==usr)
view()<<"[src.owner] picked up [src]"
src.loc=usr
walk_towards(src,src)
usr.SaveMob()
usr<<"<b>Your Game has been Saved!"
In response to Asterr
src.loc=usr then walk_towards(src,src)? What exactly is being done here?
In response to NNAAAAHH
When I send it out, it follows the user. That's just to make it stop
In response to Asterr
Well, could you post the entire Load() definition so I can tell exactly where line 15 is? I assumed it was on src.verbs+=newverbs.
In response to NNAAAAHH
NNAAAAHH wrote:
Well, could you post the entire Load() definition so I can tell exactly where line 15 is? I assumed it was on src.verbs+=newverbs.

My Bad, Line 15 would be src.Read(F)