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.

Another question: what's wrong with this script?

Old posts that have not been replied to for several years.
Locked
d
daplaya

Post by daplaya »

This is my first script and I can't find why it doesn't work :sad:

Code: Select all

bind pubm - !kick pub_kick

proc pub_kick {nick host handle chan args} {
set whom [lindex $args 0]
if {[onchan $whom $chan]} {
puthelp "PRIVMSG $chan : watches as $nick kicks $whom to the balls with a large wooden hammer" 
} else {
puthelp "PRIVMSG $chan :I don't see $whom around"
  }
}
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Use the 'pub' bind type instead of 'pubm'.
g
gpdza

Post by gpdza »

Also, unless you're aware of the special meaning of 'args' as a variable name, use something else, like 'text'.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Replace from:
bind pubm - !kick pub_kick

to:
bind pub - !kick pub_kick

Use "arg" for your arguments.


<font size=-1>[ This Message was edited by: caesar on 2002-01-22 10:36 ]</font>
d
daplaya

Post by daplaya »

OK thnx, weird though...in the tutorial I read it told me to use pubm instead of pub.
And what's with that args? Can't I name it whatever I want? Or is there some reason why I shouldn't name it args? Changed it to text just in case..
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

read the second paragraph of manual page proc(n)
Locked