S sarkis Member Licensed User Longtime User Mar 5, 2012 #1 I cannot find an error Here is a compiling error --------- Compiling code. Error Error parsing program. Error description: Missing Keyword: end sub Occurred on line: 192 End If --------- Sub Check_Move As Boolean If (Grid(prevSun+1, prevTox).Enabled=True) OR (Grid(prevSun-1, prevTox).Enabled=True) OR (Grid(prevSun, prevTox+1).Enabled=True) OR (Grid(prevSun, prevTox-1).Enabled=True) Then Return True Else Return False End If End Sub Thanks
I cannot find an error Here is a compiling error --------- Compiling code. Error Error parsing program. Error description: Missing Keyword: end sub Occurred on line: 192 End If --------- Sub Check_Move As Boolean If (Grid(prevSun+1, prevTox).Enabled=True) OR (Grid(prevSun-1, prevTox).Enabled=True) OR (Grid(prevSun, prevTox+1).Enabled=True) OR (Grid(prevSun, prevTox-1).Enabled=True) Then Return True Else Return False End If End Sub Thanks
NJDude Expert Licensed User Longtime User Mar 5, 2012 #2 This line should be like this: Code: Sub Check_Move I'm assuming your IF...THEN is in one line, otherwise you need a line continuation using an underscore after OR, like: Code: If (Grid(prevSun+1, prevTox).Enabled=True) OR _ (Grid(prevSun-1, prevTox).Enabled=True) ... Upvote 0
This line should be like this: Code: Sub Check_Move I'm assuming your IF...THEN is in one line, otherwise you need a line continuation using an underscore after OR, like: Code: If (Grid(prevSun+1, prevTox).Enabled=True) OR _ (Grid(prevSun-1, prevTox).Enabled=True) ...
S sarkis Member Licensed User Longtime User Mar 5, 2012 #3 you are right ! You are right ,thank you But what a stupid syntax is? Anyway thanks a lot Upvote 0