Closed AzaraelDR closed 2 years ago
So I think I may have fixed this. Due to the ubiquitous nature of if statements this is a very dangerous change so I've made it a separate package on the Test Release. Please go there (link below) and try the 407-ELSE.Fix.zip client
https://github.com/GenieClient/Genie4/releases/edit/Test_Build
That link doesn't bring me anywhere, just back to my profile page.
That is because I'm an idiot and gave you the wrong link sorry try this one https://github.com/GenieClient/Genie4/releases/tag/Test_Build
That seems to have worked. My test script worked fine and ran through Geniehunter on a few cycles with no issue. I would still recommend letting other people test it some and make sure there isn't a fringe case.
When using
else if
after anif
statement, the secondelse
will recognize if the firstif
condition is true and skip evaluation, however the nextelse if
will believe the previous evaluation was false and proceed to process itsif
statement. If this condition evaluates toTrue
, the code for this statement will execute even though the initial condition should cause it to skip execution.Sample script follows:
debug 10 var a 1 var b 1 var c 1 var d 0
if (%a) then { echo 1 } else if (%b) then { echo 2 } else if (%c) then { echo 3 } else if (%d) then { echo 4 } else echo 5