Microsoft VBScript compilation error '800a041f': Unexpected 'Next'
I'm trying to program a multiplayer tic-tac-toe game in VBScript/ASP.
Microsoft VBScript compilation error '800a041f': Unexpected开发者_高级运维 'Next'
Here's the code on which the error above occurs:
For x = 1 To 3
If AllEqual(arr(x,1), arr(x,1), arr(x,1)) Then
If arr(x,1) = GetText(currentplayer) Then
bWinner = currentplayer
Else If arr(x,1) = GetText(0) Then
'nothing to do
Else
If GetNumber(arr(x,1)) <> currentplayer Then
bWinner = GetNumber(arr(x,1))
End If
End If
End If
Next
And here's the output of the error message:
/iTicTic/play.asp, line 82
Next ^
What am I doing wrong here?
Edit: full code here: http://pastebin.com/BcR4HZ4a
I believe it's due to the use of Else If
, the proper syntax is ElseIf
. Basically with Else If
it is seeing that as a new If
statement that would need it's own closing End If
statement.
精彩评论