mob/proc
Save()
src.AFKUndo()
src.verbstosave+=src.verbs
var/savefile/F = new("Saves/[src.key].sav")
..()
F["Verbs"]<<src.verbstosave
F["last_x"]<<src.x
F["last_y"]<<src.y
F["last_z"]<<src.z
F["PokeList"]<<src.PokeList
Write(F)
..()
src<<"Game saved!"
Load()
if(fexists("Saves/[src.key].sav"))
var/savefile/F=new("Saves/[src.key].sav")
Read(F)
..()
F["Verbs"]>>src.verbstosave
F["last_x"]>>src.x
F["last_y"]>>src.y
F["last_z"]>>src.z
F["PokeList"]>>src.PokeList
src.verbs+=src.verbstosave
src.loc=locate(src.x,src.y,src.z)
world<<"<font color=#de7979><u>[src]</u> has logged in!"
return
else
src<<"<u>You don't have a save file here!</u>"
mob/var/PokeList=list()
mob/var/verbstosave=list()
Problem description:
Saving works perfectly well, but when I catch a Pokemon and add it to the PokeList, it corrupts the save file.
It confuses me, because I have the same thing for Badges, but the badges don't corrupt the saves, they work perfectly well, and they're not even defined in the Save().
My thoughts are it's trying to save the list with mobs in it, and after trying with Raimo on a fix, I'm resulting to posting it for a bigger audience perspective.
We tried adding
F["mob"]<<src
and
F["mob"]<<usr
and even
var/mob/Player/M
F["mob"]<<M
but nothing seems to be working properly.
Thoughts?