This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

control <idx> <proc> not working [fixed] - bad c

Old posts that have not been replied to for several years.
Locked
n
nihaopaul1

control <idx> <proc> not working [fixed] - bad c

Post by nihaopaul1 »

control $idx script_name
Tcl error: wrong # args: should be "control handle idx arg"

the documents only talk about control idx proc in eggdrop 1.6.17

Code: Select all

proc temp {name server port} {
        set idx [connect $server $port]
        send_tochan "[idx2hand $idx]"
        control [idx2hand $idx] $idx temp_sock #returns idx temp_sock
        #control $idx temp_sock #return error: Tcl error: wrong # args: should be "control handle idx arg"
}
proc temp_sock {handle idx arg} {
        send_tochan "$handle $idx $arg"
        return 0
}
all i want is to assign the output to a proc, is this a problem in the script or with eggdrop? anyhelp would be appriciated

i do know that information is waiting on the socket
Last edited by nihaopaul1 on Sun Oct 31, 2004 1:22 pm, edited 1 time in total.
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

Code: Select all

set tcpidx 0
control $tcpidx control:addAversEXPSlave
proc control:addAversEXPSlave { idx text } { putloglev o * "Text: $text" }
Que?
n
nihaopaul1

Post by nihaopaul1 »

when i try i get: Tcl error: invalid idx

what i did find out is that the following code is right but i had to downgrade to eggdrop 1.6.16 for it to work! strange but true.

Code: Select all

proc temp {name server port} {
        set idx [connect $server $port]
        control $idx temp_sock
}
proc temp_sock {idx arg} {
        if { [lindex $arg 0] eq "PING" } { putidx $idx "PONG [lindex $arg 1]" }
        return 0
}
eggdrop 1.6.17 reports an error
f
falcon69
Voice
Posts: 6
Joined: Sat Aug 13, 2005 2:49 am

Post by falcon69 »

nihaopaul1 wrote:when i try i get: Tcl error: invalid idx

what i did find out is that the following code is right but i had to downgrade to eggdrop 1.6.16 for it to work! strange but true.

Code: Select all

proc temp {name server port} {
        set idx [connect $server $port]
        control $idx temp_sock
}
proc temp_sock {idx arg} {
        if { [lindex $arg 0] eq "PING" } { putidx $idx "PONG [lindex $arg 1]" }
        return 0
}


eggdrop 1.6.17 reports an error
im confused....where does that code come in? i downgraded to 1.6.16..what else should i do to make it work?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

what are you trying to accomplish?
f
falcon69
Voice
Posts: 6
Joined: Sat Aug 13, 2005 2:49 am

Post by falcon69 »

http://forum.egghelp.org/viewtopic.php? ... ight=phpbb

been trying to get this working for about 5 hours..any help would be nice, im getting the Tcl error: invalid idx. ive found several topics about it but none seem to help, this is the closest thing to a fix ive found....
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

read the top thread of this forum ("Help Us To Help You")
f
falcon69
Voice
Posts: 6
Joined: Sat Aug 13, 2005 2:49 am

Post by falcon69 »

okay, i commented those lines, where do i type .set errorinfo?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

take a wild guess
f
falcon69
Voice
Posts: 6
Joined: Sat Aug 13, 2005 2:49 am

Post by falcon69 »

in a pm? in the irc channel? cuz those didnt come back w/ anything
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well, try to take an educated guess then... knowing that the command set has to have a dot in front of it, what's the first and obvious destination candidate place for that command that comes to mind?
f
falcon69
Voice
Posts: 6
Joined: Sat Aug 13, 2005 2:49 am

Post by falcon69 »

well my guess would be the irc channel..but im a newbie....
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

wrong

may I kindly recommend you get back to reading eggdrop docs and online help system, also this website's resources (I somehow suspect that you haven't read those at all); you actually have way to go before trying to fix scripts, you need to learn the basics of using eggdrop first
Locked