
this bellow is scripts that i wrote/modify on trivia script in order to devide that userfile question into 2 part (2 files) that will be choose randomly every 10 minutes
first thing i set:
set tgqdb "/usr/bla/bla/bla/trivia.question"
into:
set tgqdb ""
then i write these things:
#TEST
set filerandomtimer 10
timer $filerandomtimer randomfile
proc randomfile {} {
global filerandomtimer botnick
if {$tgqdb == "/usr/home/bla/scripts/question1"} {
set tgqdb "/usr/home/bla/scripts/question2"
}
} else {
set tgqdb "/usr/home/bla/scripts/question1"
timer $filerandomtimer randomfile
}
}
#
but this script did'nt work and i dont know where's wrong, when i try to load my bot in shell there's a message error like this:
[02:12] Tcl error in file 'trivegg':
[02:12] wrong # args: should be "proc name args body"
while executing
"proc randomfile {} {
global filerandomtimer botnick
if {$tgqdb == "/usr/home/bla/scripts/question1"} {
set tgqdb "/usr/home/bla/scri..."
(file "scripts/test.tcl" line 259)
invoked from within
"source scripts/test.tcl"
(file "bot" line 205)
[02:12] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
-bash-2.05b$
Is there any 1 can help me pls? i dont know much about tcl, but i dont wanna my bot get killed anymore, so i'll apreciate any help from you guys
