Sub CheckScreenOrientation(up As Boolean)
Dim ph As Phone
'
If globalInvertOnReturn Then
If Not(up) Then
If lastO = 8 Then
Else
lastO = 8
ph.SetScreenOrientation(lastO)
End If
Else
If lastO = 0 Then
Else
lastO = 0
ph.SetScreenOrientation(lastO)
End If
End If
End If
End Sub
If
I changed it to
B4X:
If up = False Then
All ok, then back to Not(up) and then ok as well?
Initially I had to gradually eliminate all other code in the sub until only the If line was left and still had the error report (from the background compilation).
No such error previously with B4A V4.
It certainly ought to be something else! It is a most unhelpful error message.
I commented everything out of the sub almost line by line until the fault report disappeared then took the comment off the last line i changed and started commenting around it. That is how i ended up with just the If line (and its End If) with the fault still there. Then i experimented with what was in the If.
Quicker to do on a short sub! but it may be a way of getting you on the move again.
F10 is the shortcut for Step Out. It is not a shortcut for compiling your program. You need to use F5 or one of the other options to compile and run your app.
F10 is the shortcut for Step Out. It is not a shortcut for compiling your program. You need to use F5 or one of the other options to compile and run your app.
A word or two to thank you for your new version of B4A. Your new editor is really good. The upgraded auto-complete feature takes a little getting used to but, once in the rhythm of it, code writing is much faster. The highlighting of matching brackets and if-then and end-if is also a great time saver. I also like the line parsing feature that Steve mentioned above. Great work on your part...