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 

wrong # args - confused

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


Joined: 13 Nov 2004
Posts: 7

PostPosted: Sun Nov 06, 2005 9:19 pm    Post subject: wrong # args - confused Reply with quote

Hello all,

I am writing a TCL script for my WoW guild channel that would enable users to add their WoW characters to a database. I have this as script to add characters:

Code:
proc cu_addchar {nick host handle chan text} {
   set charname [lindex $text 0]
   set race [lindex $text 1]
   set class [lindex $text 2]
   set level [lindex $text 3]
   putmsg $nick "Adding \002$charname\002 (Level $level $race $class) to the database."
   set wowdb [open wowchars.db a+]
   puts $wowdb $charname $race $class $level
   close $wowdb
   putmsg $cuchan "$nick has added a new character, $charname (Level $level $race $class) to the database."
}


when I use the bind to trigger this process, the bot's console spits out this message:

Code:
[02:16] Tcl error [cu_addchar]: wrong # args: should be "cu_addchar nick host handle chan text"


Which I do not understand, I have all those args in the proc header already Confused

Code:
proc cu_addchar {nick host handle chan text} {


It's all there right ? What am I doing wrong here ?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Nov 07, 2005 7:37 am    Post subject: Reply with quote

.set errorInfo tells you exactly where the error occurs. I assume that the proc is being called with not enough attributes.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
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