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.

BIND join and BIND part what is wrong??

Help for those learning Tcl or writing their own scripts.
Post Reply
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

BIND join and BIND part what is wrong??

Post by juanamores »

BIND join works perfect, but NOT BIND part.

Code: Select all

bind join - * join_join
bind part - * part_part
set chan1 "#chan1"
set chan2 "#chan2"

 proc join_join {nick uhost hand chan} {
global chan1 chan2
if {$chan == "$chan1"} { 
putmsg $chan2  "$nick has joined $chan1"
} else {
return
}}

proc part_part {nick uhost hand chan} {
global chan1 chan2
if {$chan == "$chan1"} { 
putmsg $chan2  "$nick has left  $chan1"
} else {
return
}}
Tcl error [part_part]: wrong # args: should be "part_part nick uhost hand chan"
I tried renamed procedures by others, but always gives me error BIND part.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: BIND join and BIND part what is wrong??

Post by willyw »

juanamores wrote:

Code: Select all

...
proc part_part {nick uhost hand chan} {
...
Tcl error [part_part]: wrong # args: should be "part_part nick uhost hand chan"
...
Go here:
http://www.eggheads.org/support/egghtml ... mands.html

and text search to find
bind part
to locate the section about that bind.
Read that section, and then compare to your line quoted above.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Re: BIND join and BIND part what is wrong??

Post by juanamores »

willyw thank you I already fixed. :D
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

to me I me work quite so :
[12:41] <@JulieTh> Arnold_X-P has joined #tcls
[12:43] <@JulieTh> Arnold_X-P has left #tcls

Code: Select all

bind join - * join_join
bind part - * part_part
set chan1 "#tcls"
set chan2 "#bom"

 proc join_join {nick uhost hand chan} {
global chan1 chan2
if {$chan == "$chan1"} {
putmsg $chan2  "$nick has joined $chan1"
} else {
return
}}

proc part_part {nick uhost hand chan {msg ""}} {
global chan1 chan2
if {$chan == "$chan1"} {
putmsg $chan2  "$nick has left  $chan1"
} else {
return
}}
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

Arnold_X-P wrote:to me I me work quite so :
Yes, Arnold_X-P, to give more compatibility to the process, there was a syntax that did not know, until willyw taught me.
New Tcl procs should be declared as
proc partproc {nick uhost hand chan {msg ""}} { ... }
for compatibility.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

when you give or solve please juanamores snag in the web the solution do not say that it solves
so we all learn, and see that of that the forum talks each other to learn

ok juanamores !!!!!

no seas un lamer pega la solucion y no esperes a que otro lo solucione :twisted:
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

Arnold_X-P wrote: no seas un lamer pega la solucion y no esperes a que otro lo solucione :twisted:
Siempre pego mis soluciones, aun cuando no me lo solicitan, en este caso la solución la encontró willyw y el puso el enlace a la misma.
Todos los créditos son de willyw, por eso no me pareció necesario volver a pegar el contenido del enlace que está en este post.
Me parece algo ofensivo y exagerado tu comentario llamandome lamer.

Every time I've solved a question, I shared all my solutions, without I asked. In this case, the solution was found by willyw, and put a link to it.
All credits are willyw, so it did not seem necessary to paste the contents of the link found in this post.
I find something offensive and exaggerated your comment calling me lamer.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
Post Reply