Quiz App not showing correct answer, how can i solve it?

Hi guys, i'm trying to make a Quiz App, but i can't make it work.
When i select the correct answer it keeps showing as it were wrong.
That's the error.

That's the blocks.

That's the CSV tables that is being used

image
the Button.Text is the full option, but ans.Text is only like A,B,or C. They will never equal each other.

You need to check
IF (the index of the clicked button in ans_buttons) = (index of the ans.Text in list [A,B,C,D]) THEN
...
ELSE
...

Thanks Kevin, it works!

Can u show me a way to randomly show the questions?

  1. Make a list of 4 answers.
  2. shuffle this list
  3. show the answers on the buttons according to the order of shuffled list.
  4. when button.click, get the button's text, check its index in answer list (not shuffled list), then compare to index of the ans.Text in list [A,B,C,D]

I didn't understand. I'm trying to make the questions not following the order on CSV file. Reading your reply it seems that only shuffle the answers. Can um show me it on blocks?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.