ID:269011
Jan 19 2005, 6:12 am
|
|
I don't really want to write a save system that saves over 200~ vars, then loads them back up. Is there an easier way?
|
In response to Wizkidd0123
|
|
Wizkidd0123 wrote:
Be more specific: what are you trying to do? Having 200 variables in the first place should, if possible, be avoided. I mean so I don't have to do stuff like this: var/savefile/q = new("ASDF/ASDF.qqq") And, also, it's around 50 vars for mobs, not counting objects and other things. |
In response to Hell Ramen
|
|
Hell Ramen wrote:
And, also, it's around 50 vars for mobs, not counting objects and other things. var/savefile/q = new("ASDF/ASDF.qqq") You can just do that =) I recommend that you take a look at Deadron's BYOND Basic Savefiles if you haven't yet. |
In response to Hell Ramen
|
|
you could use vars:
<code> var/list/varsToSave = list("var1","something","another var","var7") var/savefile/q = new("ASDF/ASDF.qqq") for(var/v in varsToSave) q[v] << src.vars[v] </code> |
In response to OneFishDown
|
|
OneFishDown wrote:
you could use vars: Or possibly the other way around, with a list of vars NOT to save, then just loop through the vars list. |
Be more specific: what are you trying to do? Having 200 variables in the first place should, if possible, be avoided.