I was wondering how to implement a store storage throughout my quiz screens.
In my quiz app which has 5 screens (1 screen: start screen, screen 2-4 quiz screens, on every screen is a question dislplayed)
I also integrated the tinyDB of App inventor in every screen.
I basically want the user to do the quiz and every earned point to be stored in the next screen and increased if the answer is right. How do I do it, do I have to initialise every value on every screen? I thought it would be a solution if the user clicks on 'get pounds' in order to store the points earned?
I tried and for the first question, it works. But it doesn't store and add the points if I solve the next quiz. I know that I should use "virtual screens", but still want to open a new one for every question.
There is a Screen.Initialize event where you can load global variables and display components from TinyDB.
You can simplify scorekeeping by leaving out the global variable and by referring directly to the TinyDB GetValue of the Score tag.
It is important to use 0 as the default TinyDB value if not there, instead of blank text, to avoid poisoning the '+ 1' operation with text blank later on.