| View previous topic :: View next topic |
| Author |
Message |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Oct 03, 2007 7:29 am Post subject: Close-brace error |
|
|
| Code: | 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: | | Tcl error [relay:text]: extra characters after close-brace |
Could you suggest me where is the error. _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
tsukeh Voice
Joined: 20 Jan 2005 Posts: 31
|
Posted: Wed Oct 03, 2007 8:33 am Post subject: |
|
|
| Code: |
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.. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Wed Oct 03, 2007 8:44 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 03, 2007 9:46 am Post subject: |
|
|
@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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Oct 03, 2007 2:00 pm Post subject: |
|
|
| 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*... |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 03, 2007 2:10 pm Post subject: |
|
|
Did you try tsukeh's suggestion?
And did it help? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Oct 03, 2007 2:21 pm Post subject: |
|
|
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
Thanks _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Oct 03, 2007 2:47 pm Post subject: |
|
|
Thank you sooo much tsukeh and nml and rosc
How easy it was }{ } { it worked .. I did'nt realize.. Thanks alot once again
You guys rock
iamdeath _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
|