egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] Tcl error : wrong # args

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Seka
Voice


Joined: 19 Apr 2011
Posts: 18

PostPosted: Tue Apr 19, 2011 10:33 pm    Post subject: [SOLVED] Tcl error : wrong # args Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Apr 19, 2011 11:31 pm    Post subject: Re: Tcl error : wrong # args Reply with quote

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
View user's profile Send private message
Seka
Voice


Joined: 19 Apr 2011
Posts: 18

PostPosted: Wed Apr 20, 2011 9:42 am    Post subject: Reply with quote

That did it!

Thanks so much for your help. Looks like everything is working fine, now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber