Hi, I was wondering how to make a button on my app that saves the app progress. How do I do that?
Make a TinyDB tag for each global variable and for each thing you changed on the screen, and save them all.
Restore them when your app restarts.
Could you explain a little more?
What do you mean for app progress ? Could you explain a little more?
It might be a game; OP might want the app to save which level you are on.
The app is a clicker game so I would like to save the amount of clicks (represented on a button with text on it) to save.
You have to save only one value in your tinydb
How do I do that?
Does this work?
It will, but only if Counter_Button's text/value is updated each time you click the Button.
That's all I need
Do you want to update the Button's text or a separate label's text?
This won't work, if your intention is to save number of clicks, you should arrange your blocks this way
Here, Counter_Button is just representing specific button object only, when we use dot operator to get value of specific property, that is returned.
To get property, we do
This is what I put for when the button is clicked. Do I just put the .StoreValue by it? (Eddie is the click button)
Values used on both side of an operator, should be of same type, this is not there
If Eddie is click button then what's purpose of Counter_Button, use a globle variable instead, to keep count of clicks as I shown in earlier example code.
Since, with mathematical + you can have both operands as numbers only, else you will get error.
Please share your findings, where it doesn't work.