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);