# Quiz score not working

**URL:** <https://forum.kirupa.com/t/quiz-score-not-working/220348>\
**Category:** flash\
**Created:** [March 25, 2007, 2:56pm UTC](https://forum.kirupa.com/t/quiz-score-not-working/220348 "2007-03-25T14:56:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oblivion2010](https://avatars.discourse-cdn.com/v4/letter/o/bbe5ce/32.png) [@oblivion2010](https://forum.kirupa.com/u/oblivion2010)\
**Post date:** [March 25, 2007, 2:56pm UTC](https://forum.kirupa.com/t/quiz-score-not-working/220348/1 "2007-03-25T14:56:51Z")

</div>

Hey there,

I’m trying to create a simple quiz with a few questions, the code I have below doesn’t seem to work. It comes up with my final score as -15 all the time, its not even checking to see if the answer is correct, as soon as I load the movie the Output comes out as -5 -10 -15, and answers would be appreciated.

> 

quizBut.onRelease = function() {  
totalOutput\_txt.text = “Your final score is: “+score+”/30.”;  
};  
score = 0;  
if (\_root.answer1 == “flush”) {  
score += 10;  
} else {  
score -= 5;  
}  
trace(score);  
if (\_root.answer2 == “straight”) {  
score += 10;  
} else {  
score -= 5;  
}  
trace(score);  
if (\_root.answer3 == “123”) {  
score += 10;  
} else {  
score -= 5;  
}  
trace(score);
