views:

32

answers:

1

Hi,

I'm trying to program a multiplayer tic-tac-toe game in VBScript/ASP.

Here's the code on wich 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?

Thanks! Yvan

Edit: full code here: http://pastebin.com/BcR4HZ4a

+4  A: 

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.

jaywon