See the discussion at
viewtopic.php?f=40&t=4304
Unfortunately, as Zini says, your proposal doesn't do what you expect it to...
In the absence of better logic, it treats it as
First it evaluates the first half of the expression - if( 20 >= HRatio ) - and returns either 1 (true) or 0 (false)
Then it evaluates the second half - if( 0 => 11 ) or if( 1 => 11 ) - both of which will return 0 (false)
The suggestions from the linked thread would lead to something like:
Code: Select all
elseif ( 20 >= HRatio )
if( HRatio >= 11 )
Set RMult to 2
endif
elseif ( 30 >= HRatio )
That should work correctly, but is verbose.
My alternative suggestion simplified it by removing the second part of the comparison - I think the double comparison is unnecessary if the "elseif"s are set up correctly.
However Zini's suggestion is much simpler again.
Loriel