I have A question about variable and super variable
with a normal one and set a value you get @myvar= 0; but if you do same thing on super one it shows not set if you use 0
Set variable and super variable?
When you say “super variable” do you mean “global variable”? You can set a global variable to 0. Here’s an example. This piston changed my global variable test from 10 to 0.
a super variable has two @@ if i do what the image above shows an click add it it wiil show not set
So, if you’re not running multiple locations, there is no need for “Super Variables”, right?
@beau76
It looks to me like if the variable type is “number (decimal)” or “number (integer)” it doesn’t set propoerly. Set the variable type to “dynamic” and it seems to work. At least it will set - no idea if it actually will work as a super global.
Maybe I am just old school, but I learned a long time ago to never intentionally use 0 in variables.
(since some coding sees zeros as null or not set etc)
Tradition teaches us 0 = off and 1 = on… but I find coding is more reliable when 1 = off and 2 = on.
Hi Wcmore,
keep the idea in mind of never using 0
lets say you have a decimal variable you went to reset before every use how do yo do it ?
Thanks
Now that I think about it, I don’t know if I have ever reset a variable in webCoRE except during my testing phase… In those cases, I would pick a decimal that would not ever come up naturally.
For example, if it was the temperature, I may reset it by using:
Set variable temp = 111.1
or some other number that would never be the real temperature.