There seems to be a bug that can cause both branches of an If Else statement to be executed if there’s a nested If statement.
Example: 1BNDR
rule("If Else")
{
event
{
Ongoing - Global;
}
conditions
{
Is Button Held(Host Player, Interact) == True;
}
actions
{
If(True);
Small Message(All Players(All Teams), Custom String("Executing outer if branch", Null, Null, Null));
If(False);
Small Message(All Players(All Teams), Custom String("This action is never executed", Null, Null, Null));
End;
Else;
Small Message(All Players(All Teams), Custom String("Executing outer else branch", Null, Null, Null));
End;
}
}
There is an outer If Else statement and an inner If statement. The Else branch belongs the the outer If(True) and should never be executed because the outer If branch is always executed. But the inner If statement causes it to be executed anyway, as if the outer Else branch belonged the the inner If branch.