If I put brackets "(1 Or 0) And 0" in the first expression then it will work as I wanted.
Code: Select all
Structure SelectBall
x.i
y.i
idColor.i
EndStructure
Global SB1.SelectBall
Global SB2.SelectBall
SB1\x = 3
SB1\y = 4
SB2\x = 4
SB2\y = 4
SB1\idColor = 4
SB2\idColor = 4
If ( SB1\y = SB2\y And Abs(SB1\x - SB2\x) = 1 ) Or ( SB1\x = SB2\x And Abs(SB1\y - SB2\y) = 1 ) And SB1\idColor <> SB2\idColor
Debug Bool( SB1\y = SB2\y And Abs(SB1\x - SB2\x) = 1 )
Debug Bool( SB1\x = SB2\x And Abs(SB1\y - SB2\y) = 1 )
Debug Bool( SB1\idColor <> SB2\idColor )
EndIf
If 1 Or 0 And 0
Debug "100"
EndIf/code]