ID:159476
 
Well....I need to know how to save a objects contents (Pokeball and the pokemon in its contents) that is in some mobs contents (Trainer and the pokeball in its contents)...why?...because i get this when Loading from save file :

runtime error: cannot append to list
proc name: Load (/client/proc/Load)
source file: Save.dm,23
usr: Destrojer (/mob/player)
src: Destrojer (/client)
call stack:
Destrojer (/client): Load()
Destrojer (/mob/player): Login()

load["Items"] >> src.mob.contents // as line 23 in the error


Everything works fine...or does it?....I sent out the pokemon inside the pokeball.....cool works....but then return....

runtime error: Cannot modify null.mob.
proc name: Return (/mob/enemy/Eevee/verb/Return)
source file: NPC-s.dm,46
usr: Wild Eevee (/mob/enemy/Eevee)
src: Wild Eevee (/mob/enemy/Eevee)
call stack:
Wild Eevee (/mob/enemy/Eevee): Return()
Anyone?
In response to Destrojer
This thing works fine untill I save and then load....maybe it's a save problem in general?

mob/var
Exists=0

client
proc
Save()
if(!src)return
if(!src.mob)return
var/savefile/save
save = new ("Player Saves/[mob.ckey].sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
save["Items"] << src.mob.contents
Load()
var/savefile/load
load = new ("Player Saves/[mob.ckey].sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
load["Items"] >> src.mob.contents


So...is there anything wrong in this code?
In response to Destrojer
You shouldn't >> x. Try making vars called temp_x, temp_y and temp_z, and loading them, and then using locate() to set loc.
And the contents is saved automatically when you save the mob...
In response to Immibis
Yeah,great...now it's even worse...it won't even load when i have a pokeball with a pokemon in it. xD