I have problem with malformed question
#
# Parse Question
#
proc KAOSParseQuestion {QNum} {
global KAOSMarker KAOSQuestions KAOSQuestion KAOSAnswers KAOSAnswerCount KAOSForcedQuestion KDebug
set KAnswersLeft ""
if {$QNum < 0} {
set KAOSFileQuestion $KAOSForcedQuestion
} {
set KAOSFileQuestion $KAOSQuestions($QNum)
}
if {$KDebug > 1} {kaoslog "kaos" "Picked:$QNum Question:$KAOSFileQuestion"}
if [info exists KAOSAnswers] {unset KAOSAnswers}
# Position of first "*"
set KAOSMarkerIDX [string first $KAOSMarker $KAOSFileQuestion]
if {$KAOSMarkerIDX < 1} {
kaoslog "KAOS" "Malformed Question #$QNum"
}
set KAOSQuestionEndIDX [expr $KAOSMarkerIDX - 1]
set KAOSQuestion [string range $KAOSFileQuestion 0 $KAOSQuestionEndIDX]
I have tried several ways to solve this but the problem still persists. When I run this script and the problem occurs, the bot will ask a blank question and we have to type '!' to answer the question. I already check the question file and I cant find anything wrong, so I think it shud be on scripting code.
Many thanks