Page 1 of 1

uservariable share values?

Posted: Wed Mar 05, 2014 6:06 am
by KaL
i created 2 modules A and B

A = uservariable: key1 value=0

B = uservariable: key2 value= 0

i changed module B uservariable: key2 value=2

then to find out module A uservariable: key1 also change to the same value=2.

why is that? i even updated both the module to add the uservariables to the game and its added but they still share the same values.

Re: uservariable share values?

Posted: Wed Mar 05, 2014 4:11 pm
by a_bertrand
User variables are defined by a key. If the key uses another ID in the config/auto_defines.php you cannot have this issue.

Re: uservariable share values?

Posted: Wed Mar 05, 2014 6:12 pm
by KaL
yeah i check the defined keys, they are set at different numbers and names but its still the same. i'm going to just reinstall. it was working then it stop.

Re: uservariable share values?

Posted: Thu Mar 06, 2014 6:47 pm
by KaL
ok Alain. it's still the same even if i deleted from the database and re-install it again. -the uservariable still share the same values. i set uservariable "open" value= 0 then it also set the uservariable "close" value= 0. i don't know what to do now.

Re: uservariable share values?

Posted: Thu Mar 06, 2014 6:55 pm
by a_bertrand
You will have to show your code, as just like that I can tell you it's not possible. The game uses the uservariables for a lot of different things, for example for the combats. If they would not work, we should have spotted the error already. At least I believe so ;)

Re: uservariable share values?

Posted: Fri Mar 07, 2014 5:39 am
by KaL
$go = GetUserVariable ("CompName");
$cost = GetConfigValue("CompCost");


hahaha! kyle just told me why already. he link me back to the wiki on uservariable. :lol: -it was a dumb mistake. -i guess i like to use quotes on everything that has ( ). :oops:

Re: uservariable share values?

Posted: Fri Mar 07, 2014 8:46 am
by a_bertrand
those strings inside uservariables are actually "defined" values. That is why you must leave them outside of the quotes.