#Why does this loop twice?
3 messages · Page 1 of 1 (latest)
You need to add else before the second if. That'll make it one big if/else if/else block with 3 conditions: if A, if B, and everything else.
Since you don't have that "else if" your code is doing
If A print A
If B print B
Else Error
You want
If A print A
Else If B print B
Else Error