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 

Close-brace error

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


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Wed Oct 03, 2007 7:29 am    Post subject: Close-brace error Reply with quote

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
View user's profile Send private message Visit poster's website
tsukeh
Voice


Joined: 20 Jan 2005
Posts: 31

PostPosted: Wed Oct 03, 2007 8:33 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Oct 03, 2007 8:44 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 03, 2007 9:46 am    Post subject: Reply with quote

@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
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Wed Oct 03, 2007 2:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 03, 2007 2:10 pm    Post subject: Reply with quote

Did you try tsukeh's suggestion?
And did it help?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Wed Oct 03, 2007 2:21 pm    Post subject: Reply with quote

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 Razz

Thanks
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Wed Oct 03, 2007 2:47 pm    Post subject: Reply with quote

Thank you sooo much tsukeh and nml and rosc Smile

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

You guys rock

iamdeath
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
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