ID:167253
 
I'm editing a pet system to my liking, and I want to be able to save and load my pet, but I've encountered a problem: I wanna save EVERY variable of the pet, without having to keep repeating the lines:
F["variable"] << pet.variable

But I don't know how. I tryed just saving the list "pet.vars" but it keeps saying "cannot change constant value", so I know that was the wrong approach. Any suggestions?
You can save the whole pet as one variable.

F["pet"] << pet


~~> Unknown Person
In response to Unknown Person
We tryed that...Didn't work... We did something like this:

for(var/mob/pet/C in world)
if(src.pet == 1 && C.owner == src)
F["petvars"] << C


in our save/load codes, but it didn't save anything.
In response to KirbyRules
Bump.
In response to KirbyRules
Do you LOAD the pet? :/
In response to Mysame
Yes, I LOAD the pet. :P