Page 1 of 1

Messing with VARS

PostPosted: Wed Jun 18, 2008 9:26 pm
by toshiro
Does anyone know if there is way to check for a variable without loading it :?: :? I am trying to make a login system for my game, and to have more than one user account i have set up multiple save groups to save each individual username and password but i need a way to make the game check the number of usenames and passwords currently saved(without loading them)so it knows which group to save the variables for a new account in each time. My save groups are in order from "NameandPassword1" to "NameandPassword10". I know its kind of hard to explain but any help would be great.

Re: Messing with VARS

PostPosted: Wed Jun 18, 2008 11:24 pm
by DST
One way would be to have another saved variable that goes up every time someone makes an account, and goes down every time someone deletes an account. That variable will tell you how many accounts have been made.

Re: Messing with VARS

PostPosted: Mon Jun 23, 2008 2:46 pm
by Thanx
If you're talking about the problems of BIG variables, that noticably slow down the game, then I have to recommend dangerous waters: pointers. They're small, they don't load the variable they point to, like somearray[10000]. But it is kinda messy to handle them, so few of us here actually use them too much.
Also, it's good to know, that pointers actually contain the variable's actor, which also adds a bit of trickyness to it.

But I can't really talk about them, cause I don't use them myself, maybe someone else should talk about this to you, if this is what you want to use? :D