簡體   English   中英

Microsoft VBScript 編譯錯誤“800a041f”:意外的“下一步”

[英]Microsoft VBScript compilation error '800a041f': Unexpected 'Next'

我正在嘗試在 VBScript/ASP 中編寫多人井字游戲。

Microsoft VBScript 編譯錯誤“800a041f”:意外的“下一步”

這是發生上述錯誤的代碼:

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

這是錯誤消息的輸出:

/iTicTic/play.asp,第 82 行

下一個\n ^

我在這里做錯了什么?

編輯:這里的完整代碼: http : //pastebin.com/BcR4HZ4a

我相信這是由於使用了Else If ,正確的語法是ElseIf 基本上與Else If將其視為一個新的If語句,需要它自己的結束End If語句。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM