multiple "OR" conditions bug

Post your own tutorials, guides and demos.

Post » Sun Dec 06, 2009 7:58 am

I have found a bug when using multiple "OR"s in a "for" loop. I'm looping from 1 to 10 and i want to do some action when the number is 1 or 3. I also want to do a different action when the number is 3 or 5. In total only four actions should be done, but when I use "OR" in six actions get done. :shock:
Not a show stopper but my events would look cleaner if it was fixed.
B
79
S
24
G
54
Posts: 4,740
Reputation: 40,743

Post » Sun Dec 06, 2009 3:49 pm

Confirmed
Its already known that OR is buggy, might post the cap to the bug tracker, cause I have no idea why there is an a4. :shock: On a side note there is nothing wrong with using the no OR way, I mean in essence there really is no difference... just a few more lines that say the same thing, and couldn't possibly take more time.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Dec 06, 2009 8:13 pm

Here is an updated cap with another even more elegant way to bypass this bug. On the wiki [url:2982g9z2]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Expressions[/url:2982g9z2] there is a list of all the operators that construct can use in expressions including not well known ones. So now I can do this as the condition:
[code:2982g9z2]((LoopIndex=1) or (LoopIndex=3))?1:0 Equal to 1[/code:2982g9z2] instead of [code:2982g9z2]LoopIndex Equal to 1
OR
Loopindex Equal to 3[/code:2982g9z2]

Construct is awesome!
B
79
S
24
G
54
Posts: 4,740
Reputation: 40,743


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 4 guests