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.
Old posts that have not been replied to for several years.
Tristam
Voice
Posts: 17 Joined: Sun Sep 21, 2003 11:28 am
Location: Finland
Post
by Tristam » Sun Sep 21, 2003 11:34 am
Hello everyone! I'm new to tcl and I want to learn it
I've been reading FAQs and guides but I just cant get a simple command to work. I want it like this: When someone says "muuh" in the channel, the bot responds saying "Muuuuuuuuuuh yourself $nick!" in the channel... Here's the code:
Code: Select all
bind pubm - muuh pubm:muuh
proc pubm:muuh { nick host hand chan } {
puthelp "PRIVMSG $chan :Muuuuuuuuuuh yourself $nick!"
}
The bot says in partyline: "Tcl error [pub:muuh]: wrong # args: should be "pub:muuh nick host hand chan""
I'm using the lates version of WinDrop, could anyone help me?
e
era5or
Post
by era5or » Sun Sep 21, 2003 11:37 am
bind pubm - muuh pubm:muuh
proc pubm:muuh { nick host hand chan text} {
puthelp "PRIVMSG $chan :Muuuuuuuuuuh yourself $nick!"
}
u need to have TEXT because u are awaiting a text input
Tristam
Voice
Posts: 17 Joined: Sun Sep 21, 2003 11:28 am
Location: Finland
Post
by Tristam » Sun Sep 21, 2003 11:46 am
Thanks, that was part of the reason, but I think I needed to change "pubm" to "pub"... Anyway, thanks, I got it working now
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Sep 21, 2003 12:45 pm
Yes, it's pub and you should check the tcl-commands.doc file
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Sep 21, 2003 2:29 pm
it can be pubm too, in this case it doesn't matter, the main problem was that the 5th element was missing from the proc (fixed by era5or).
read tcl-commands.doc to see the difference between pub and pubm