help with error please

sarkis

Member
Licensed User
Longtime User
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
This line should be like this:
B4X:
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:
B4X:
If (Grid(prevSun+1, prevTox).Enabled=True) OR _
(Grid(prevSun-1, prevTox).Enabled=True) ...
 
Upvote 0
Top