Formatting of code : You can (and must) use [ tcl ] an [ /tcl ] tags (without spaces in tags) to format your TCL codes and have syntax coloration x


error trivia tcl
#4
Crazycat, please help



Code:
#shows timed hints.
proc tghint {} {
    global tgmaxhint tghintnum tgcurrentanswer tghinttimer tgchan
    global tgtimehint tghintchar tgquestionnumber tgquestionstotal
    global tgcurrentquestion tghintcharsused tgnextqtimer tgtimenext tgstreak tgstreakmin
    global tgnobodygotit tgtrythenextone tgmissed tgmaxmissed tgcmdstart tgshowanswer
    global tgtimestart tgtimeanswer tgalwaysshowq tgmaxhintcurrent tgtempnohint tgcapshint
    global tgmaxacumulated tgpointsperanswer tgmaxallowed tgcmdtrivia
    if {[catch {incr tghintnum}]!=0} {
        set tghintnum 0
        regsub -all -- "\[^A-Za-z0-9\]" $tgcurrentanswer "" _hintchars
        set tgmaxhintcurrent [expr [strlen $_hintchars]<=$tgmaxhint?[expr [strlen $_hintchars]-1]:$tgmaxhint]
        catch {tgunbindhintcmd}
        if {$tgmaxhintcurrent>0} {
            set tgrebindhinttimer [utimer $tgtempnohint tgbindhintcmd]
        }
    }
    if {$tghintnum >= [expr $tgmaxhintcurrent+1]} {
        incr tgmissed
        if {$tgmaxacumulated==0} {
            set tgmaxacumulated [expr $tgpointsperanswer]
        } else {
            set tgmaxacumulated [expr $tgmaxacumulated + $tgpointsperanswer]

when i restarted my bot .. i have the same issue. am i doing it right?
  Reply


Messages In This Thread
error trivia tcl - by mabrook - 26/08/2021, 10:38
RE: error trivia tcl - by CrazyCat - 27/08/2021, 00:22
RE: error trivia tcl - by mabrook - 27/08/2021, 08:53
RE: error trivia tcl - by mabrook - 06/09/2021, 12:34
RE: error trivia tcl - by CrazyCat - 06/09/2021, 13:01
RE: error trivia tcl - by mabrook - 06/09/2021, 13:19
RE: error trivia tcl - by CrazyCat - 06/09/2021, 13:33
RE: error trivia tcl - by mabrook - 06/09/2021, 18:39
RE: error trivia tcl - by CrazyCat - 07/09/2021, 00:07
RE: error trivia tcl - by mabrook - 07/09/2021, 07:25

Forum Jump:


Users browsing this thread: 1 Guest(s)