| View previous topic :: View next topic |
| Author |
Message |
Seka Voice
Joined: 19 Apr 2011 Posts: 18
|
Posted: Tue Apr 19, 2011 10:33 pm Post subject: [SOLVED] Tcl error : wrong # args |
|
|
I am receiving the following error with most of my commands in this particular script. I'm not sure what the issue is. Any help is appreciated.
| Code: | | Tcl error [pub_wine]: wrong # args: should be "pub_wine nick uhost hand channel" |
Here is the actual proc:
| Code: | proc pub_wine {nick uhost hand channel} {
global botnick
putserv "PRIVMSG $channel :\001ACTION takes down an elegant glass from the rack above the bar and pours $nick a healthy amount of Vintish red.\001"
return 0
}
bind pub - !wine pub_wine |
Thanks in advance!
Last edited by Seka on Wed Apr 20, 2011 1:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Apr 19, 2011 11:31 pm Post subject: Re: Tcl error : wrong # args |
|
|
Reference:
http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html
and see:
| Quote: |
PUB
bind pub <flags> <command> <proc>
procname <nick> <user@host> <handle> <channel> <text>
|
In your script, the bind is a bind pub.
The corresponding proc needs to accept five variables passed to it.
Yours has only four:
| Code: |
proc pub_wine {nick uhost hand channel} {
|
Make it:
| Code: |
proc pub_wine {nick uhost hand channel text} {
|
I hope this helps. |
|
| Back to top |
|
 |
Seka Voice
Joined: 19 Apr 2011 Posts: 18
|
Posted: Wed Apr 20, 2011 9:42 am Post subject: |
|
|
That did it!
Thanks so much for your help. Looks like everything is working fine, now. |
|
| Back to top |
|
 |
|