Help with Displaying the Correct Answer Instead of Just the Index

Hi everyone, I have just started so I'm still lost and new to this.

I’m working on a "quiz app" like guess the animal's name for kids and am having trouble with displaying the correct answer (correct name of the animal). Right now, the app displays the index (e.g., 1, 2, 3, 4) instead of the actual animal names (like "Cat", "Dog", etc.). How can I resolve this? And make it random every time a user play? Your help is greatly appreciated.


In button 1 .click, near the bottom, the correct answer text should be selected from global variable button 1, not global variable answers.

Similar for button 2,3,4.

1 Like

Thanks for your response. I followed your suggestion and used the correct global variable associated with each button (e.g., Button1), but when I do this, it displays an animal name which isn't the correct answer. The displayed animal name doesn't match the correct answer. The issue now is that I'm unable to pull the correct answer based on the button clicked, even though I'm referencing the correct variable for each button. What could I do to fix this and ensure the correct answer is shown?


How can you find out the correct answer using your logic?
What about doing it like this App Inventor Tutorials and Examples: Advanced Features | Pura Vida Apps

Taifun

1 Like

Thanks everyone. I have finally solved my problem. :slightly_smiling_face:

Perhaps tell/show us what you changed in order to fix things, so that others may learn ?

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