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.

Close-brace error

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Close-brace error

Post by iamdeath »

Code: Select all

   if {[string match -nocase $endof $text]}{
       relay:send "PRIVMSG $endofchan :$nick: $text"
       relay:send "PRIVMSG $endofchan :$nick: These are just Live End of the over results. For Live ball-by-ball Cricket Commentary between $nick  Join #Channel"
}

The error comes in DCC is:

Code: Select all

Tcl error [relay:text]: extra characters after close-brace
Could you suggest me where is the error.
|AmDeAtH @ Undernet
Death is only the *Beginning*...
t
tsukeh
Voice
Posts: 31
Joined: Thu Jan 20, 2005 6:22 am

Post by tsukeh »

Code: Select all

if {[string match -nocase $endof $text]} {
       relay:send "PRIVMSG $endofchan :$nick: $text"
       relay:send "PRIVMSG $endofchan :$nick: These are just Live End of the over results. For Live ball-by-ball Cricket Commentary between $nick  Join #Channel"
}
one space more..
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

When will people learn to use .set errorInfo to find out what the real error is?

More than likely the problem is $text contains tcl-special chars and you didn't use [split] to protect it.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

@rosc: Considdering there's no list-commands, there is no reason to use split at all here... And there's nothing that would cause the content of $text to be evaluated either in the posted code.

@iamdeath:
One question, or maybe two:
Is that the whole body of relay:text?

If not, post the whole proc... (could you post it with head aswell?)

Also, just as tsukeh suggested, add a space between } and { in the if-statement... You need it, and it is most likely the source of the error...
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

nml375 wrote:@rosc: Considdering there's no list-commands, there is no reason to use split at all here... And there's nothing that would cause the content of $text to be evaluated either in the posted code.

@iamdeath:
One question, or maybe two:
Is that the whole body of relay:text?

If not, post the whole proc... (could you post it with head aswell?)

Also, just as tsukeh suggested, add a space between } and { in the if-statement... You need it, and it is most likely the source of the error...
Thanks for replying, actually it is not the whole body, but when the script was not working I commented these 3 or 4 lines and now my script is working so it soo sure that the problem lies in these lines. For not sharing my whole body is my script is sensitive and private so I can not show it to public but if you say I can send you a private msg to have a look into it, but the problem is I commented these lines and then I restarted my bot and there are no errors. Your help will be really appreciated.

Thanks
iamdeath
|AmDeAtH @ Undernet
Death is only the *Beginning*...
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Did you try tsukeh's suggestion?
And did it help?
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

No but it is such a nice point I realized that too, and I think that will be the problem, right now I can not check my script the reason is this script can be tested on certain points or lets say on certain time. I will be able to check this script tomorrow morning. I am deadly sure those spaces are the problem I will definately let you know as soon as it's fixed.

Thanks alot really thank you soo much nml. I spent like 2 hours to find out what and where the error is, and how easy it was to :P

Thanks
|AmDeAtH @ Undernet
Death is only the *Beginning*...
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Thank you sooo much tsukeh and nml and rosc :)

How easy it was }{ } { it worked :D.. I did'nt realize.. Thanks alot once again

You guys rock

iamdeath
|AmDeAtH @ Undernet
Death is only the *Beginning*...
Post Reply