Page 1 of 1

Local variables, or any varibles for that matter

Posted: Tue Oct 19, 2004 8:21 pm
by Foot Soldier
I can not get any saved varibles to work. I have tried LVARs, MVARs, and GVARs.

I tried using the existing value, LVAR_Herebefore. I used the functions like I saw other scripts, set_local_var(LVAR_Herebefore, 1); But then I tested it and it does not change the value.

In the scripts it uses these all the times and they seem to work, how come they don't for me?

For map variables, I used the FSE map variable thing, had the .gam file, the .h file included, and it still would not work. The value was set as 0 in the .gam file, and remained 0 no matter what I did.

Do local variables work for you? Any tricks to get them to work?


Also, how do local varibles work? Im guessing that the #define LVAR_ is just for a refrence number, and somewhere is a list of values that are saved? If this is so, what are 1, 2, and 3 reserved for? All the ones I see seem to be 0, 4, 5, etc...

Incase you guys are just as clueless about this as I am, I will keep looking for the answers, and report back if i get anything done.

Posted: Sun Oct 24, 2004 8:55 pm
by ColJack
are you trying thr script out in the game or the mapper?
because the mapper doesn't deal with variables in scripts very well.. unless you change the line in the mapper2.cfg that says "run_mapper_as_game" to 1..
it's something to do with it not setting up the variables properly...

the #define just defines the text lable LVAR_xxx as the number you set.

i think the number of lvars for a script need to be set in the scripts.lst file