moviemadness
Programmer
hi i get an error about
Microsoft VBScript runtime error: Subscript out of range: '[number: 0]'
see this is strange right cos this is my code:
this bit works..............
If Curuser.bOperator And CurUser.sName = CStr(owner) Then
If Mid(sCurData, 1, 5 + Len(botname)) = "$To: " & botname Then
MyArray = GetCmdArray(sCurData, ">", ";"
Select Case MyArray(0)
Case "DEMOTE"
If UBound(MyArray, 1) = 1 Then
If demote(MyArray(1)) Then
Curuser.PrivateMessage CStr(botname), MyArray(1) & " is deleted"
Else
Curuser.PrivateMessage CStr(botname), MyArray(1) & " is not a power OP"
End If
Else
Curuser.PrivateMessage CStr(botname), "error may be wrote wrong try - demote;nick"
End If
End Select
End If
End If
but this next one dont...............
If Curuser.bOperator Then
MyArray = GetCmdArray(sCurData, ">", ";"
If Mid(sCurData, 1, 1) = "$" Then
privat = 1
End If
Select Case MyArray(0)
Case "+UINFO"
If UBound(MyArray, 1) = 1 Then
Curuser.PrivateMessage CStr(botname), vbCrLf & GetUserInfo(MyArray(1), 1)
Else
Curuser.PrivateMessage CStr(botname), "ERROR::, UINFO;Nick please type again"
End If
End Select
End If
End Sub
all inside sub dataArrival and yes i did Dim Myarray
and here is the MyArray processing...................
Function GetCmdArray(Data, Start, Delimeter)
Dim i, MyArray, temp
Dim sCommand,x
Dim sDCI,sTmp
Dim iCHubs,iSlots
Dim sConn
If Start <> "" Then
For i = 1 To Len(Data)
If Mid(Data, i, 1) = Start Then
temp = Mid(Data, i + 1, Len(Data) - i)
Exit For
End If
Next
temp = Trim(temp)
Else
temp = Data
End If
MyArray = Split(temp, Delimeter, -1, 1)
MyArray(0) = UCase(MyArray(0))
GetCmdArray = MyArray
End Function
hope someone can help
u could also msn
gorillauk@lineone.net
TIA
Microsoft VBScript runtime error: Subscript out of range: '[number: 0]'
see this is strange right cos this is my code:
this bit works..............
If Curuser.bOperator And CurUser.sName = CStr(owner) Then
If Mid(sCurData, 1, 5 + Len(botname)) = "$To: " & botname Then
MyArray = GetCmdArray(sCurData, ">", ";"
Select Case MyArray(0)
Case "DEMOTE"
If UBound(MyArray, 1) = 1 Then
If demote(MyArray(1)) Then
Curuser.PrivateMessage CStr(botname), MyArray(1) & " is deleted"
Else
Curuser.PrivateMessage CStr(botname), MyArray(1) & " is not a power OP"
End If
Else
Curuser.PrivateMessage CStr(botname), "error may be wrote wrong try - demote;nick"
End If
End Select
End If
End If
but this next one dont...............
If Curuser.bOperator Then
MyArray = GetCmdArray(sCurData, ">", ";"
If Mid(sCurData, 1, 1) = "$" Then
privat = 1
End If
Select Case MyArray(0)
Case "+UINFO"
If UBound(MyArray, 1) = 1 Then
Curuser.PrivateMessage CStr(botname), vbCrLf & GetUserInfo(MyArray(1), 1)
Else
Curuser.PrivateMessage CStr(botname), "ERROR::, UINFO;Nick please type again"
End If
End Select
End If
End Sub
all inside sub dataArrival and yes i did Dim Myarray
and here is the MyArray processing...................
Function GetCmdArray(Data, Start, Delimeter)
Dim i, MyArray, temp
Dim sCommand,x
Dim sDCI,sTmp
Dim iCHubs,iSlots
Dim sConn
If Start <> "" Then
For i = 1 To Len(Data)
If Mid(Data, i, 1) = Start Then
temp = Mid(Data, i + 1, Len(Data) - i)
Exit For
End If
Next
temp = Trim(temp)
Else
temp = Data
End If
MyArray = Split(temp, Delimeter, -1, 1)
MyArray(0) = UCase(MyArray(0))
GetCmdArray = MyArray
End Function
hope someone can help
u could also msn
gorillauk@lineone.net
TIA