phew Posted October 7, 2007 Posted October 7, 2007 $auth = StringRegExp($srcv, ':(.*?)!(.*?)@(.*?) (.*?) (.*) :(.*)', 1) For $i = 0 To UBound($auth) -1 Select Case $i = 0 $nick_as_target = StringStripWS($auth[0], 8) Case $i = 2 $foundhost = StringStripWS($auth[$i], 8) Case $i = 4 $cmdtarget = StringStripWS($auth[$i], 8) If (StringLeft($cmdtarget,1) <> "#") Then $cmdtarget = $nick_as_target EndIf Case $i = 5 $cmdstring = $auth[$i] EndSelect Next If ($foundhost = $hostmatch) Then $cmdl = StringRegExp($cmdstring, $triggerchar & '(.*?) (.*)', 1) $cmdsplit = StringSplit($cmdl, " ") $countarray = UBound($cmdsplit) For $i = 0 To $countarray - 1 Select Case $i = 1 $cmdparam_1 = StringStripWS($cmdsplit[$i], 8) Case $i = 2 $cmdparam_2 = StringStripWS($cmdsplit[$i], 8) Case $i = 3 $cmdparam_3 = StringStripWS($cmdsplit[$i], 8) EndSelect Next If ($cmdl <> 0) Then $cmd = $cmdl[0] _commands() EndIf EndIf i think there is a misstake somewhere in If ($cmdl <> 0) Then $cmd = $cmdl[0] _commands() EndIf because the script works without any problems when i run it as *.au3, by compiling it and running the .exe there is an error at $cmd = $cmdl[0] $cmd = $cmdl[0] $cmd = $cmdl^ ERROR Error: Subscript used with non-Array variable. i think there is something wrong with the if ($cmdl <> 0) then any reason why it doesnt work as .exe but as *.au3? how can i fix this?
Valuater Posted October 7, 2007 Posted October 7, 2007 (edited) where did you define $cmdl[0] ???? $cmd = $cmdl[0] this also defines $cmdsplit[0] as a "total number" of how many splits were made 8) Edited October 7, 2007 by Valuater
phew Posted October 7, 2007 Author Posted October 7, 2007 where did you define $cmdl[0] ???? $cmdl = StringRegExp($cmdstring, $triggerchar & '(.*?) (.*)', 1)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now