Problem facing in scoring

Now here is the problem. I want to add points when the user clicks on certain buttons and I want to store that value. I have made the code that is given below. It adds 10 points when I click on it but it did not stay. I want it to stay and add whenever I click on it again but this is not happening. I don't know what the problem is. I really need help with this. Thanks in advance:)
blocks (1)

What are you doing to restore the values in global score and Label2.Text when you return from screen StressLevel?

when Screen1.Initializate
    set [global score] to  Call [TinyDB1].GetValue
                                               Tag  "[score]"

This code may set the score variable to the scrore stored on TinyDB1, So, you can get the score.

I don't know whether I had to do it. So I did not do anything for that. Can you please help me how to do it?

Yes of course!
I just need to know the name of the Screens to speak the way the project is :smiley:

The output is coming is like 30. When it should be 10. I don't know why this?

I followed what you said but the output is like 30 when it should be 10.

Can you get me the code from StressScreen?

The screen that opens after clicking on the button StressLevel is StressLevel but it has nothing to do with this. I think because when I click the button I want to have 10 scores and after I return I want the 10 value to be there and that 10 value needs to add every time I click on the button. I want to apply this on another button and the scenario is basically the same that when I click the button another screen opens and 10 scores are added to the previously stored score. I hope you understand my problem. If you want the blocks of this screen in which the blocks are showing I can give it to you. The blocks that are given above are of the screen name "MainScreen". It is under the comment. Thanks for helping.:slight_smile:
blocks (2)

On the when event, you should use call tinyDB1.storevalue, with the tag as "score" and the valuetostore as "get global Stresslevel" Please show me the blocks from stresslevel Screen.

Now the output coming is 10 but when I return from the StressLevel screen it goes back to 0. when I click on the button again 10 comes as output but goes back to 0 after I come back from the next screen. I really don't know what is happening to my code. I am really worried. Here is the StressLevel screen blocks. blocks (3)

Have you added a TinyDB.storevalue block over the open another screen screenname screen1 block?

The recommended method of switching screens in App Inventor

Are you talking about the stress level screen. If yes then No!! how should I add this.Please guide me? Thanks in advance

Sorry but I don't get it. My problem basically is about the scores added when the user clicks on a button to open another screen. My problem is that the score is not counting and it is not storing. I know I have to use tinyDB but I don't know how. I have used the above blocks but it did not work. How is learning of of making multiple screen going to help me?

You need to avoid the extra work of multiple screens by using instead stacked vertical arrangements in just one screen.
That solves all your problems transferring data and refreshing variables and component contents.