Sign in to follow this  
Followers 0
phew

$cmd = $cmd[0]

3 posts in this topic

$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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

where did you define $cmdl[0] ????

$cmdl = StringRegExp($cmdstring, $triggerchar & '(.*?) (.*)', 1)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0