Function StartEruP() . MainMenu=CreateWindow("Main Menu",300,300,400,500,main,15) . Ev=WaitEvent() . Es=EventSource() . Repeat . . Select Es . . . Case MainMenu . . . If Ev=$803 Then . . . . Blah=Proceed("Do you really want to quit?") . . . . If Blah=1 Then . . . . . End . . . . . Else . . . . . If Blah<>1 Then . . . . . . Notify("Find out what you want next time") . . . EndIf . . . . . EndIf..... . . . . EndIf............ . . End Select . Until KeyDown(1) End Function StartERuP() End
"EndIf" of "End If" (the same) closes only the last If block, so the lines you were drawing here aren't correct.
If (test1) Then
If (test2) Then
If (test3) Then
End If ;closes If (test3)
End If ;closes If (test2)
End If ;closes If (test1)
Indention is only handy to remind yourself what If block the EndIf is closing. The PC doesn't respond to indention.