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.

Help with error [SOLVED]

Help for those learning Tcl or writing their own scripts.
Post Reply
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

Help with error [SOLVED]

Post by vince164 »

hi i get this error
Tcl error [pub:help]: wrong # args: should be "pub:help nick chan"
what dose this mean?

here is the code

Code: Select all

bind pub - !remove pub:remove
bind pub - !help pub:help
proc pub:remove {nick chan} {
  if { $chan == "#vhost" } {
    putquick "PRIVMSG hostserv :DEL $nick"
    putquick "PRIVMSG $chan :$nick 4your vhost has been removed, 8Thank you for stoping by #vhost have a good day"
    return
  }
}
proc pub:help {nick chan} {
  if { $chan == "#vhost" } {    putquick "PRIVMSG $chan :!Remove - will remove your vhost"
    putquick "PRIVMSG $chan :!vhost hostname - will give you the vhost specified"
    putquick "PRIVMSG $chan :would set your vhost to: I.got.my.own.vhost"
    putquick "PRIVMSG $chan :The choosen vhost is permanent, only when your nick is registered, and will be enabled on identification with nickserv"
    return
  }
}
putlog "Loaded vhost script"
Last edited by vince164 on Tue May 23, 2006 10:23 pm, edited 1 time in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Change:

Code: Select all

proc pub:help {nick chan}
to

Code: Select all

proc pub:help {nick uhost hand chan}
proc name args body

Args specifies the formal arguments to the procedure. It consists of a list, possibly empty, each of whose elements specifies one argument. Each argument specifier is also a list with either one or two fields. If there is only a single field in the specifier then it is the name of the argument; if there are two fields, then the first is the argument name and the second is its default value.
Further details can be obtained from the Built-In Commands - proc manual page.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

Post by vince164 »

now i get this error

Tcl error [pub:help]: wrong # args: should be "pub:help nick uhost hand chan"
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Ok.. try this:

Code: Select all

proc pub:help {nick uhost hand chan text}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

Post by vince164 »

thanks that workes!
Post Reply