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.

Why wont this work ..

Old posts that have not been replied to for several years.
Locked
t
typefighter

Why wont this work ..

Post by typefighter »

hi people,

I'm very new to all this TCL & eggdrop stuff, but I wanna make my own script which basically (for now) just notice's me when I join the channel. I know that sounds stupid, but I wanna make sure I can at least get it to do that before I unleash it on the chatters, hehe.
This is what I have ..

bind join - * pgreet

proc pgreet { nick } {
if {$nick == "alex"} {
putnotc $nick "Hi $nick"
}
}

I've also tried changing all the "nick"'s for "hand".

I get this message ..

[14:35] Tcl error [pgreet]: called "pgreet" with too many arguments

Please help, it might just be the syntax is wrong, but I dunno where.

Thanks in advance,

- type
m
mortician
Voice
Posts: 37
Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:

Post by mortician »

the binding of "join" will give 4 arguments to your "proc": <nick> <user@host> <handle> and <channel>

your proc expects only 1 argument (nick)

so make it proc "proc pgreet { nick uhost handle channel} { ..."

for more information about the bindings take a look at the tcl documentation that is comming with your egg, or at http://tcl.powersource.cx/eggtclh11.php

greetings
t
typefighter

Post by typefighter »

Yep, works now. Thanks dude :o) Much appreciated.


- type
Locked