Real Comparison Bug created going from 0.9.8 to 0.9.8.2
thebitmaster
PRO Posts: 75
I've got a Real variable initially set to 0. I have two rules.
If RealVariable <= 0, reset RealVariable to random(50,150)
timer every .3 seconds
RealVariable = RealVariable -10
In 0.9.8, this would correctly cause the value to get reset every time it dropped to zero or below. In 0.9.8.2, it only execute the reset once, after which the value just freefalls into subzero territory forever.
I can correct this by putting the comparison into the timer like this:
timer every .3 seconds
RealVariable = RealVariable -10
If RealVariable <= 0, reset RealVariable to random(50,150)
However, the difference in behavior between the two versions is pretty severe.
To make matters worse, if you change the initial value of RealVariable to a positive number like 50, both algorithms work the same way. If it was just an optimization, this wouldn't be the case. It's a bug, and I've reported it to the GS team.
If RealVariable <= 0, reset RealVariable to random(50,150)
timer every .3 seconds
RealVariable = RealVariable -10
In 0.9.8, this would correctly cause the value to get reset every time it dropped to zero or below. In 0.9.8.2, it only execute the reset once, after which the value just freefalls into subzero territory forever.
I can correct this by putting the comparison into the timer like this:
timer every .3 seconds
RealVariable = RealVariable -10
If RealVariable <= 0, reset RealVariable to random(50,150)
However, the difference in behavior between the two versions is pretty severe.
To make matters worse, if you change the initial value of RealVariable to a positive number like 50, both algorithms work the same way. If it was just an optimization, this wouldn't be the case. It's a bug, and I've reported it to the GS team.
Comments