egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
nihaopaul1
Guest





PostPosted: Sun Oct 31, 2004 4:54 am    Post subject: control <idx> <proc> not working [fixed] - bad c Reply with quote

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

PostPosted: Sun Oct 31, 2004 6:44 am    Post subject: Reply with quote

Code:

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

_________________
Que?
Back to top
View user's profile Send private message Visit poster's website
nihaopaul1
Guest





PostPosted: Sun Oct 31, 2004 1:18 pm    Post subject: Reply with quote

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

PostPosted: Sat Aug 13, 2005 3:40 am    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 13, 2005 3:56 am    Post subject: Reply with quote

what are you trying to accomplish?
Back to top
View user's profile Send private message Visit poster's website
falcon69
Voice


Joined: 13 Aug 2005
Posts: 6

PostPosted: Sat Aug 13, 2005 4:00 am    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 13, 2005 4:13 am    Post subject: Reply with quote

read the top thread of this forum ("Help Us To Help You")
Back to top
View user's profile Send private message Visit poster's website
falcon69
Voice


Joined: 13 Aug 2005
Posts: 6

PostPosted: Sat Aug 13, 2005 4:44 am    Post subject: Reply with quote

okay, i commented those lines, where do i type .set errorinfo?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 13, 2005 5:00 am    Post subject: Reply with quote

take a wild guess
Back to top
View user's profile Send private message Visit poster's website
falcon69
Voice


Joined: 13 Aug 2005
Posts: 6

PostPosted: Sat Aug 13, 2005 5:02 am    Post subject: Reply with quote

in a pm? in the irc channel? cuz those didnt come back w/ anything
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 13, 2005 5:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
falcon69
Voice


Joined: 13 Aug 2005
Posts: 6

PostPosted: Sat Aug 13, 2005 5:09 am    Post subject: Reply with quote

well my guess would be the irc channel..but im a newbie....
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 13, 2005 5:18 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber