ID:264972
 
Code:
//SAVING AND LOADING:
mob/proc
Save()
var/savefile/S = new("Savefiles/Players/[ckey].sav")
S["Friends"] << src.Friends
Load()
if(fexists("Savefiles/Players/[ckey].sav"))
var/savefile/S = new("Savefiles/Players/[ckey].sav")
S["Friends"] >> src.Friends
src << "Savefile found, and loaded."


Problem description:
Well, every time I save regular variables it saves perfectly. Along with loading perfectly. But.. When I try an save my mob/var/list/Friends = list() list. I get no runtime error, I just can't save or load the Friends list. I don't know exactly what is happening. I tried #define DEBUG and got no feedback on the problem.

The mob/var/list/Friends = list() code is filled like so: src.Friends.Add(player) If you need further information please ask.
Are you actually calling them?
Have you changed them to verbs and tested them like that?
In response to Pirion
Yes, I call '<code>Load()</code>' when I use '<code>Login()</code>', and I call '<code>Save()</code>' at '<code>Logout()</code>'.

Then my output from loading at <code>Login()</code> spams: "A. Ness has logged in", "A. Ness has logged out". A crap load of times.
In response to A. Ness
<small>mob/Login()</small> is called when you load your save file because it is creating a new mob.
In response to Neimo
So calling <code>Load()</code> under <code>Login()</code> causes a loop? Would it be better to place it under <code>client/New()</code>?
In response to A. Ness
Yes.
In response to Neimo
Thanks, that fixed it up.