Hi I am having trouble with if statements.
If they get a question wrong in my quiz ( weakest link) the money clip goes to zero and it goes onto the next question. If they get it right the money clip advances and they go onto the next question. I want to include each time that it should only go onto the next question if all questions have been asked. SO i want an extra if clause in both sections, saying if current question is more than 11 go to '#game over"
The questions are saved in the frame of the quiz
_root.qArray = new Array(“question: A;B;C;D”)
_root.qArray.push(“Question?:A;B; C; D”)
There are 11 questions.
At the moment at the section with choosing answers I have
function selectAnswer(n) {
// correct
if (answers[n] == correctAnswer) {
_root.money.nextFrame();
// ask next question
questionNum++;
displayQuestion();
} else {
// wrong
_root.money.gotoAndStop(1);
// ask next question
questionNum++;
displayQuestion();
}
Could anyone give me pointers to add in
I presume I want if (currentq==>11);{
gotoAndPlay “game over”;
}else{
displayQuestion();
thanks :s: