I am trying to get the code where, if the user presses the button on the upgrade screen it activates the code for the autoclicker on the main screen, but even though I clear the variables in the TinyDB the autoclicker keeps running on the main screen, how could I fix this.
(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
.
Have you used the same tinydb name in all the screen(you should maintain same namespace in all screen to get proper working of tinydb)? If value not found on the button click why the place is empty? It should be 0 know? What will happen when the clock timers?
If you set both properly and still not working then upload the aia as said by abg.
You have not shown us the screen switching code.
I see you have at least 2 Clocks running.
Be sure to disable all Clocks before you switch Screens.
I have uploaded the aia so you can see the code and its functions
Here are the downloaded blocks images for the two relevant screens.
You have not followed advice on
- Using number 0 as the TinyDB default for numeric values
- Stopping all clocks before switching screens
Come back when you have fixed all that.
I have fixed the stopping clocks before switching screens, but I am confused on what you mean by using number 0 as the TinyDb default for numerical values
This is a special case covered generally at
Let's look at your basketballs count, on your first run.
You assign it a blank text if it is not found in TinyDB.
Later you try to add or subtract from it, using math blocks.
They don't like blank text. They only work with numbers.
After you fix all this, run your code.
I have changed all the not found variables to zero and I am still having this problem
Upload your latest .aia file, and remind us what the problem is?
Lebron_Clicker_Create1 (1).aia (566.6 KB)
the problem is, when I press the button on upgrade_screen, it causes the score on Screen1 to go up by one every second, but instead of activating when I press the button it adds one a second every time I open the app
From what I've seen of your Project, it would be simpler to just use one Screen (Screen1), and stack Vertical Arrangements for what used to be different screens. Just keep them all invisible except for one Visible at a time.
Just to put it out there, here is a version of your Project that uses accepted techniques to open other screens.

Screen1:
Upgrade screen:
Lebron_Clicker_Create1_1 (1).aia (567.5 KB)