Syntax error for Else If ... Then

Monkey Forums/Monkey Programming/Syntax error for Else If ... Then

Foppy(Posted 2011) [#1]
This gives a syntax error on the line marked "<-- here":
If KeyHit(KEY_1) Then
   Print("1")
Else If KeyHit(KEY_2) Then ' <-- here
   Print("2")
End If

After removing the Then, the syntax error is not reported:
If KeyHit(KEY_1) Then
   Print("1")
Else If KeyHit(KEY_2)
   Print("2")
End If

This happens in strict and non-strict mode. Maybe I am overlooking something.


ziggy(Posted 2011) [#2]
AFAIK, This was fixed in latest update. Download if from the products update section, in the account tab of this site, if you haven't done it already.


Foppy(Posted 2011) [#3]
Ok, thanks. I should have tried that first!