Hi all,
I am making a trivia game for a class project and I am getting this error I have not seen before and cannot figure out how to fix it. Context is I am using XML to load information into the game and overMulti is a boolean[] and then overStart and overCont are booleans. It is the first overMulti if statement causing the problems but it also says the function checkAnswer doesn’t exist?? But that is a future problem, I think. Is this a situation where I have a few small errors and I can tinker and fix it or is my approach wrong? I am new to coding and cannot yet tell when I am a semicolon away from being right or like 20 lines of code away. Anyways, I would really appreciate any help or advice you guys have!
void mouseClicked() {
if (overStart && state == 0) { //if mouse is clicked on start button AND the state is the start screen, 0, move to the game state, 1 (switch statement in draw with states)
state = 1;
if (overCont && state == 2) { //if mouse is clicked on continue button AND the state is feedback screen, 2, move to the game state, 1
state = 1;
if (activeQuestion < questions.size()) {
activeQuestion++;
}
if (overMulti && state == 1) { //if mouse is clicked on multiple choice button AND the state is game, 1, move to feedback screen, 2
answers.get(activeQuestion).checkAnswer(); //check answer to activeQuestion
state = 2;
} else if (overCont && state == 2) { //else if mouse is clicked on continue button and the state is the feedback screen, 2, move to game, 1
if (activeQuestion < questions.size()) { //move to next question in array
activeQuestion++;
state = 1;
//check the multiple choice buttons for clicks
for (int i = 0; i < overMulti.length; i++) {
if (overMulti[i]) {
questions.get(activeQuestion).guess = answers.get(activeQuestion).possAns[i];
answered = true;
//THIS IS WHERE THE USER ANSWERS CHECKED
}
}
}
}
}
}
}