i need help about tcl scripting. i've been loaded some tcl game into my eggie but when i trying type !start, bot response on via DCC tell "Tcl error [tmcquiz_ask]: extra characters after close-quote"
the code for tmcquiz_ask is:
## ask a question, start game
proc tmcquiz_ask {nick host handle channel arg} {
global qlist quizstate botnick
global tipno tiplist
global userqnumber usergame userqlist
global timeasked qnumber qlistorder theq
global qnum_thisgame
global userlist timerankreset
global quizconf
variable anum 0
variable txt
## only accept chatter on quizchannel
if {![mx_str_ieq $channel $quizconf(quizchannel)]} {
return
}
# switch -exact $quizstate {
# "paused" {
# mxirc_notc $nick "1,0 Game is paused. "
# return 1
# }
# "stopped" {
# mxirc_notc $nick "1,0 Game is stopped. "
# return 1
# }
# }
## record that $nick spoke (prevents desert detection from stopping,
## when an user joins and starts the game with !ask)
if {![mx_str_ieq $nick $botnick]} {
mx_getcreate_userentry $nick $host
}
## any questions available?
if {[llength $qlist] == 0 && [mx_userquests_available] == 0} {
mxirc_say $channel "15,4 Sorry.. 15,2 my database is empty. "
} elseif {$quizstate == "asked"} {
## game runs, tell user the question via msg
set txt "Current"
if {[info exists theq(Level)]} {
set txt "$txt level $theq(Level)"
}
if {$usergame == 1} {
set txt "$txt user"
}
set txt "$txt question no. $qnum_thisgame is \""
if {[info exists theq(Category)]} {
set txt "${txt}\($theq(Category)\) "
}
set txt "$txt$theq(Question)\" open for [mx_duration $timeasked]"
if {$theq(Score) > 1} {
set txt "$txt, worth $theq(Score) points."
} else {
set txt "$txt."
}
mxirc_notc $nick $txt
} elseif {$quizstate == "waittoask" && ![mx_str_ieq $nick $botnick]} {
## no, user has to be patient
mxirc_notc $nick "Please stand by, the next question comes in less than $quizconf(askdelay) seconds."
} else {
##
## ok, now lets see, which question to ask (normal or user)
##
## clear old question
foreach k [array names theq] {
unset theq($k)
}
if {[mx_userquests_available]} {
## select a user question
array set theq [lindex $userqlist $userqnumber]
set usergame 1
incr userqnumber
mx_log "--- asking a user question: $theq(Question)"
} else {
variable ok 0
while {!$ok} {
## select a normal question
if {$qnumber >= [llength $qlistorder]} {
set qnumber 0
set qlistorder [mx_mixedlist [llength $qlist]]
}
array set theq [lindex $qlist [lindex $qlistorder $qnumber]]
set usergame 0
# skip question if author is about to win
if {[info exists theq(Author)] && [info exists userlist($theq(Author))]} {
array set auser $userlist($theq(Author))
if {$auser(score) >= [expr $quizconf(winscore) - 5]} {
mx_log "--- skipping question number $qnumber ([lindex $qlistorder $qnumber]), author is about to win"
## clear old question
foreach k [array names theq] {
unset theq($k)
}
} else {
mx_log "--- asking question number $qnumber ([lindex $qlistorder $qnumber]): $theq(Question)"
set ok 1
}
} else {
mx_log "--- asking question number $qnumber ([lindex $qlistorder $qnumber]): $theq(Question)"
set ok 1
}
incr qnumber
}
}
incr qnum_thisgame
if {$qnum_thisgame == 1} {
set timerankreset [unixtime]
mx_log "---- it's the no. $qnum_thisgame in this game, rank timer started."
} else {
mx_log "---- it's the no. $qnum_thisgame in this game."
}
##
## ok, set some minimal required fields like score, regexp and the tiplist.
##
## set regexp to match
if {![info exists theq(Regexp)]} {
## mask all regexp special chars except "."
set aexp [mx_tweak_umlauts $theq(Answer)]
regsub -all "(\\+|\\?|\\*|\\^|\\$|\\(|\\)|\\\[|\\\]|\\||\\\\)" $aexp "\\\\\\1" aexp
# get #...# area tags for tipgeneration as regexp
regsub -all ".*\#(\[^\#\]*\)\#.*" $aexp "\\1" aexp
set theq(Regexp) $aexp
} else {
set theq(Regexp) [mx_tweak_umlauts $theq(Regexp)]
}
# protect embedded numbers
if {[regexp "\[0-9\]+" $theq(Regexp)]} {
set newexp ""
set oldexp $theq(Regexp)
set theq(Oldexp) $oldexp
while {[regexp -indices "(\[0-9\]+)" $oldexp pair]} {
set subexp [string range $oldexp [lindex $pair 0] [lindex $pair 1]]
set newexp "${newexp}[string range $oldexp -1 [expr [lindex $pair 0] - 1]]"
if {[regexp -- $theq(Regexp) $subexp]} {
set newexp "${newexp}(^|\[^0-9\])${subexp}(\$|\[^0-9\])"
} else {
set newexp "${newexp}${subexp}"
}
set oldexp "[string range $oldexp [expr [lindex $pair 1] + 1] [string length $oldexp]]"
}
set newexp "${newexp}${oldexp}"
set theq(Regexp) $newexp
mx_log "---- replaced regexp '$theq(Oldexp)' with '$newexp' to protect numbers."
}
hope you all can solved my problem in here

i dont know what happened.
and i'm using eggdrop 1.6.13
Thank you.
Regards,