| View previous topic :: View next topic |
| Author |
Message |
nihaopaul1 Guest
|
Posted: Sun Oct 31, 2004 4:54 am Post subject: control <idx> <proc> not working [fixed] - bad c |
|
|
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: |
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 |
|
| Back to top |
|
 |
KrzychuG Master

Joined: 16 Aug 2003 Posts: 306 Location: Torun, Poland
|
Posted: Sun Oct 31, 2004 6:44 am Post subject: |
|
|
| Code: |
set tcpidx 0
control $tcpidx control:addAversEXPSlave
proc control:addAversEXPSlave { idx text } { putloglev o * "Text: $text" }
|
_________________ Que? |
|
| Back to top |
|
 |
nihaopaul1 Guest
|
Posted: Sun Oct 31, 2004 1:18 pm Post subject: |
|
|
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: |
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 |
|
| Back to top |
|
 |
falcon69 Voice
Joined: 13 Aug 2005 Posts: 6
|
Posted: Sat Aug 13, 2005 3:40 am Post subject: |
|
|
| 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: |
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? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Aug 13, 2005 3:56 am Post subject: |
|
|
| what are you trying to accomplish? |
|
| Back to top |
|
 |
falcon69 Voice
Joined: 13 Aug 2005 Posts: 6
|
Posted: Sat Aug 13, 2005 4:00 am Post subject: |
|
|
http://forum.egghelp.org/viewtopic.php?t=7996&highlight=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.... |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Aug 13, 2005 4:13 am Post subject: |
|
|
| read the top thread of this forum ("Help Us To Help You") |
|
| Back to top |
|
 |
falcon69 Voice
Joined: 13 Aug 2005 Posts: 6
|
Posted: Sat Aug 13, 2005 4:44 am Post subject: |
|
|
| okay, i commented those lines, where do i type .set errorinfo? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Aug 13, 2005 5:00 am Post subject: |
|
|
| take a wild guess |
|
| Back to top |
|
 |
falcon69 Voice
Joined: 13 Aug 2005 Posts: 6
|
Posted: Sat Aug 13, 2005 5:02 am Post subject: |
|
|
| in a pm? in the irc channel? cuz those didnt come back w/ anything |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Aug 13, 2005 5:06 am Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
falcon69 Voice
Joined: 13 Aug 2005 Posts: 6
|
Posted: Sat Aug 13, 2005 5:09 am Post subject: |
|
|
| well my guess would be the irc channel..but im a newbie.... |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Aug 13, 2005 5:18 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|