46
Ultra Hal 7.0 / Plugin ERROR?
« on: March 08, 2006, 12:01:49 am »
I got an error saying the following:
HasScript Error 9 on line 573 in column 9: Subscript out of range: 'i' The file "C:/Document and Settings...HalScript.DBG"
has been saved with the current script being used for debugging
purposes.
I used VBScript Editor to find line 573 (complying to Jerry's suggestion with another user) and here it is: vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Are we supposed to do something with that 'i'? Here's a sample code that contains line 573: If vrMusicMood > 0 Then
j = Int(Rnd * 10) ' generate a random integer between 0 and 9
If j < vrMusicMood Then
vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))
vrKeywordList = Split(vrKeywords, " ")
For i = Ubound(vrKeywordList) To Lbound(vrKeywordList)
vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
If vrNameToPlay <> "" Then
GetResponse = "You talked about " & vrKeywordList(i) & " and this reminds me this song. "
HalCommands = HalCommands & "<RUNPROG>" & vrNameToPlay & "</RUNPROG>"
Exit For
End If
Next
End If
HasScript Error 9 on line 573 in column 9: Subscript out of range: 'i' The file "C:/Document and Settings...HalScript.DBG"
has been saved with the current script being used for debugging
purposes.
I used VBScript Editor to find line 573 (complying to Jerry's suggestion with another user) and here it is: vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Are we supposed to do something with that 'i'? Here's a sample code that contains line 573: If vrMusicMood > 0 Then
j = Int(Rnd * 10) ' generate a random integer between 0 and 9
If j < vrMusicMood Then
vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))
vrKeywordList = Split(vrKeywords, " ")
For i = Ubound(vrKeywordList) To Lbound(vrKeywordList)
vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
If vrNameToPlay <> "" Then
GetResponse = "You talked about " & vrKeywordList(i) & " and this reminds me this song. "
HalCommands = HalCommands & "<RUNPROG>" & vrNameToPlay & "</RUNPROG>"
Exit For
End If
Next
End If