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.

"wrong # args" ?!

Help for those learning Tcl or writing their own scripts.
Post Reply
A
Access
Voice
Posts: 22
Joined: Sun Jun 04, 2006 6:31 am

"wrong # args" ?!

Post by Access »

Code: Select all

proc msg:invite { nick uhost hand arg } {
global mychan
 if { $nick == "MyNick" } {        
        if { $arg == "" } {               
               putserv "NOTiCE $nick No Chan!! \002!invite <#Chan>\002"
               }               
        } else { 
               foreach nick [chanlist $arg] {
               putserv "invite $nick $mychan"      
               }         
        }        
 }
Tcl error [msg:invite]: wrong # args: should be "msg:invite nick uhost handle chan arg"


Whats wrong? :(
Last edited by Access on Fri Jun 16, 2006 1:49 am, edited 1 time in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

the invocation syntax of [msg:invite]
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

I'll make this really easy and translate:

Code: Select all

proc msg:invite { nick uhost hand arg }
should be

Code: Select all

proc msg:invite { nick uhost hand chan arg }
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I have rather the feeling, there is another proc called "msg:invite" which overwrites this one! Because if the trigger would be public, it would have complained about too less arguments (should be 4), but the proc shown has only 4, so we assume it it binded really to msg, but than the argument number would be correct, so there must be a msg:invite intented to be bound to pub.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
A
Access
Voice
Posts: 22
Joined: Sun Jun 04, 2006 6:31 am

Post by Access »

nope, just another proc named "pub:invite" but now i changed procname but didnt work too!
sry for my english, im german!

Code: Select all

proc msg:inv { nick uhost hand chan arg } {
global mychan
        if { $arg == "" } {            
               putserv "NOTiCE $nick Kein Channel angegeben! \002!invite <#Chan>\002"             
        } else { 
               foreach nick [chanlist $arg] {
               putserv "invite $nick $mychan"      
               }         
        }
}
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

what does your error mesasge look now like? I am still confident I was right :D.

@Access: Dein Englisch ist nicht das Problem :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Post Reply