uservariable share values?

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

uservariable share values?

Post 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.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: uservariable share values?

Post 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.
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: uservariable share values?

Post 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.
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: uservariable share values?

Post 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.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: uservariable share values?

Post 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 ;)
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: uservariable share values?

Post 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:
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: uservariable share values?

Post by a_bertrand »

those strings inside uservariables are actually "defined" values. That is why you must leave them outside of the quotes.
Creator of Dot World Maker
Mad programmer and annoying composer
Post Reply

Return to “General”