egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

KAOS multiple asnwers trivia by MArky

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Ozhak
Voice


Joined: 30 Nov 2006
Posts: 7
Location: Manchester, UK

PostPosted: Sat Dec 23, 2006 12:18 am    Post subject: KAOS multiple asnwers trivia by MArky Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Dec 23, 2006 1:01 am    Post subject: Reply with quote

READ: http://forum.egghelp.org/viewtopic.php?t=10215

FORMAT your code and post the error msgs as instructed in the above page.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber