[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...)
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
}
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)
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)
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
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.
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