Issue with storing lists in a tinyDB

Hello
I am currently working on a Game and i need a Level Selector for that
(for example
I start the Game
The First Level is marked Grey
All Levels after that are marked Red
I Complete the first four Level
All those four Levels are marked Green
The Fifth Level is marked grey and all the ones after that red
i can only play the Grey and Green levels)

The Code for all that is not the problem my problem is that (of course) i want to save my progress
but whatever i try it just doesnt want to work
if i clear all the TinyDB and than restart the app everything is displayed correctly but once i finish level 1 and the procedure "next level" is called nothing works (not a single level is coloured) and its definitly not a problem that is caused by other blocks
not a single TinyDB has stored the data correctly and i dont know what to do
Might you be able to help me?

(the variables "Level completed" "Level unlocked" and "Level locked" all have stored one list with the different levels)
(The Tags "lc" "lu" and "ll" stand for "Level completed" "Level unlocked" and "Level locked")


(The Blocks with Placeholder are in Screen.Initialize i used a placeholder because the Screen.Initialize Block is very large)

(I know the last three GetValue blocks are kind of useless i just havent removed them yet)

Storing component blocks in TinyDB is inadvisable.

Try storing just the level numbers.

Also, be careful to check TinyDB retrieval default values as to whether or not they are lists vs numbers.

P.S. Be sure to change your variable names to show their types:

  • _list
  • _component
  • _index
1 Like

Sorry for the late reply
Thanks for the information i will change it

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