How I fixed it: With the help of jsmorley, I added an IfAboveStatement to reverse the IfEqualStatement.
I'm working on a game, and right now I'm making a calc to check if the money reaches 0 and if so, text appears which lets you reset everything with !RainmeterRefresh.
Problem is the calc, with formula=50, always comes out as 0.
I also made a single skin with JUST that, in fact more simplified. Same problem.
It originally was Formula=#Money#, but thinking there could have been a problem with the variable and such I switched it to a non-dynamic number. Also used IfEqualValue/Action before, but tried IfBelow just in case.
Last edited by JpsCrazy on June 18th, 2010, 3:37 pm, edited 9 times in total.
As stated below the code, I was using a dynamic variable before when I noticed problems, then switched to a regular number. (...but I totally wrote Measure=#Money# when I meant Formula=#Money# in the description.)
Removed DynamicVariables=1 and it's still not working.
Strange as it works for me. Try a clean-reinstall.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Calc measure has the feature which once outputs a default value (i.e. zore), before outputting a calculation value (or Variables). So if "0" is defined in IfEqualValue, it will surely be executed at the start.
kenz0 wrote:Calc measure has the feature which once outputs a default value (i.e. zore), before outputting a calculation value (or Variables). So if "0" is defined in IfEqualValue, it will surely be executed at the start.
...I have no idea what you mean.
So you're saying before a calc is equal to whatever it should be, before it calculates, it's default value is 0?
Nonetheless, shouldn't it update when the skin updates?
This really does seem to make sense, but this ruins any IfBelow statement. I tested them, and I couldn't get a single one to work... which would make sense if the default value is 0. Tested a IfBelowValue=-5 and well, it worked as it should. So any IfBelowStatement with positive numbers is broken.
JpsCrazy wrote:
...I have no idea what you mean.
So you're saying before a calc is equal to whatever it should be, before it calculates, it's default value is 0?
Nonetheless, shouldn't it update when the skin updates?
This really does seem to make sense, but this ruins any IfBelow statement. I tested them, and I couldn't get a single one to work... which would make sense if the default value is 0. Tested a IfBelowValue=-5 and well, it worked as it should. So any IfBelowStatement with positive numbers is broken.
I'm sorry. I'm really frustrated.
It's not that it is broken, it is just that you have to understand that an IF action is fired when it becomes true. It does NOT fire again, until it becomes false, and then true again. It is that way on purpose so it doesn't just get into a runaway loop of firing the action. So since the value of a calc or other measure starts as "0", an IfBelowAction statement is going to be true if the IfBelowValue is positive. It will stay true until the value is either above or equal to the IfBelowValue and then goes back to below.
It's how it works. There is always a way around any limitations this causes by clever use of corresponding IfEqual and IfAbove statements, but it's not "broken".
For instance if you wanted a meter to indicate that your hard drives space was below some preset target, you would set the IfBelowValue accordingly. When the skin is run it will initially be true (since I presume the limit would be above zero) but would become false as soon as the measure in question checks the hard drive and IfBelowValue is now untrue. It would remain untrue, no matter how much more hard drivie space you gained or lost, until it fell below the target once again.