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.

missing close-bracket (repeatkick.tcl)

Old posts that have not been replied to for several years.
Locked
d
dr_Fell
Voice
Posts: 14
Joined: Tue Jul 13, 2004 1:55 pm

missing close-bracket (repeatkick.tcl)

Post by dr_Fell »

Hello

I tried to install repeatkick.tcl and when I tried to restart bot I got this message:

Code: Select all

[17:09] Tcl error in file './eggdrop.conf':
[17:09] missing close-bracket
    while executing
"foreach chan [#syscomp] {
   # --- Number of repeats before kicking
   set repeatkick($chan) 3
   # --- ..in how many seconds
   set repeattime($chan)..."
    (file "myscripts/repeatkick.tcl" line 33)
    invoked from within
"source myscripts/repeatkick.tcl"
    (file "./eggdrop.conf" line 342)
[17:09] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
in line 33 brackets seem to be fine for me (but I know almost nothing about tcl...)

Code: Select all

foreach chan [#syscomp] {
   # --- Number of repeats before kicking
   set repeatkick($chan) 3
   # --- ..in how many seconds
   set repeattime($chan) 20
   # --- Repeatkick message
   set repeatmsg($chan) "Repeating"
   # --- Floodkick message
   set floodmsg($chan) "Flooding"
   # --- Ban on any repeat 
   set repeatban($chan) 0
   # --- Ban duration
   set repeatbantime($chan) 15
   # --- Repeatkick enabled/disabled (default: on)
   set repeatonoff($chan) 1
   # --- Floodkick enabled/disabled (default: on)
   set floodonoff($chan) 1
   # --- 'Character presence' tolerance
   set chartolerance($chan) 90
   # --- 'Positional matching' tolerance
   set postolerance($chan) 45
   # --- Logging of kicks (default: on)
   set logging($chan) 1
   # --- Timer ID
   set repeattimer($chan) 0
   }
Maybe somebody else can tell what's wrong here ?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: missing close-bracket (repeatkick.tcl)

Post by user »

dr_Fell wrote:[#syscomp]
That "#" is interpreted as the start of a comment, so the ] is seen as part of that comment and ignored.
What exactly are you trying to do? That foreach doesn't make sense unless you have a command called "#syscomp" that returns a list. (in that case, escape the hash using a backslash)
Have you ever read "The Manual"?
d
dr_Fell
Voice
Posts: 14
Joined: Tue Jul 13, 2004 1:55 pm

Post by dr_Fell »

I thought that I should put my channelname there, becouse with original version there are errors too:

Code: Select all

foreach chan [channels] {
   # --- Number of repeats before kicking
[quote]

[/quote]
[19:08] Tcl error in file './eggdrop.conf':
[19:08] can't set "repeatkick(#syscomp)": variable isn't array
    while executing
"set repeatkick($chan) 3"
    ("foreach" body line 3)
    invoked from within
"foreach chan [channels] {
   # --- Number of repeats before kicking
   set repeatkick($chan) 3
   # --- ..in how many seconds
   set repeattime($chan)..."
    (file "myscripts/repeatkick.tcl" line 33)
    invoked from within
"source myscripts/repeatkick.tcl"
    (file "./eggdrop.conf" line 342)
Could it be an error if tcl ?
User avatar
Jil Larner
Voice
Posts: 14
Joined: Fri Aug 20, 2004 8:28 am
Location: France

Post by Jil Larner »

Hi,

let [channels] into foreach. I think repeatkick($chan) is defined before in the proc so when tcl wants to create an array, it can't because variable is already defined, and not with an array type. You can try to add

Code: Select all

unset repeatkick
just before foreach() but be careful, i don't know the script so i can't say what it will do.
d
dr_Fell
Voice
Posts: 14
Joined: Tue Jul 13, 2004 1:55 pm

Post by dr_Fell »

There were another errors. I think that script isn't worth it... I'll search for other that does the same. Thank You all.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try the repeatkick by slennox (www.egghelp.org - My Scripts) it is fairly good and quite customizable as well! :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
d
dr_Fell
Voice
Posts: 14
Joined: Tue Jul 13, 2004 1:55 pm

Post by dr_Fell »

thanks :), it seems to be much better than tcl I was using before - I am just putting it on the server. Although script that isn't working have option of kicking for repeating similar lines, not only identical.
d
dr_Fell
Voice
Posts: 14
Joined: Tue Jul 13, 2004 1:55 pm

Post by dr_Fell »

I have found another version of that script that doesn't generate errors, but instead - isn't too efficient. Now I'm using repeatkick by slennox as You said awyeah. BTW I'm using need... works fine for me, thanks :)
Locked