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.

why isn't this working?

Old posts that have not been replied to for several years.
Locked
D
Devil
Voice
Posts: 6
Joined: Tue Oct 05, 2004 10:55 am

why isn't this working?

Post by Devil »

Can someone help me out on this one? the bot returns this error.

Code: Select all

 
Tcl error [intro]: wrong # args: should be "intro from keyword arg"
and here's how the tcl is now.

Code: Select all

bind raw - "NOTICE" intro

set intro "being"
set intro1 "introduced"

proc intro {from keyword arg} {
global intro intro1
if {[string match *$intro* $arg]} {
if {[string match *$intro1* $arg]} {
putserv "PRIVMSG #sysops :SRV_INTRODUCED! [strftime \[%H:%M\]] $arg"
}
}
}
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Re: why isn't this working?

Post by DarkJFMan »

bind raw - "NOTICE" intro

set intro "being"
set intro1 "introduced"

proc intro {from keyword arg} {
global intro intro1
if {[string match *$intro* $arg]} {
if {[string match *$intro1* $arg]} {
putserv "PRIVMSG #sysops :SRV_INTRODUCED! [strftime \[%H:%M\]] $arg"
}
}
}

That's wrong.
D
Devil
Voice
Posts: 6
Joined: Tue Oct 05, 2004 10:55 am

Re: why isn't this working?

Post by Devil »

yeah, but i got that form awyeah in some other help topic I cant remember now... It's pretty strange hehe, can you tell me how to get it to work?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Post the original, unmodified, procedure.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well, why don't you just use "bind notc" instead of binding raw to NOTICE. Directly binding to notice would be easier, if you are only considering binding for PRIVATE NOTICES, CHANNEL NOTICES and *NOT* SERVER NOTICES.

Note:

Code: Select all

if {[string match *$intro* $arg]} {
if {[string match *$intro1* $arg]} {
Can be simplied further to:

Code: Select all

if {([string match *$intro* $arg]) && ([string match *$intro1* $arg])} {
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

awyeah wrote:

Code: Select all

if {([string match *$intro* $arg]) && ([string match *$intro1* $arg])} {
Why do you use so many redundant parentheses? I've noticed you do that alot lately. ()'s are only needed when there's several parts of an expression that needs to be "grouped". The result of 'string match' is a single integer and to put parentheses around it make no sense.
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Actually I don't know but I like to group them togehter. Like when you have a long line of multiple functions, putting them into one line with ()'s in between makes them easier to seperate from each other.

To me they look nice when grouped; well not nice but they are easier for me to read, nothing else.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
D
Devil
Voice
Posts: 6
Joined: Tue Oct 05, 2004 10:55 am

Post by Devil »

Guys, thank you very much for helping me, I really apreciate it :)
Locked