Several users are struggling with a logic issue involving "saving high score." Users are attempting to code their own high score block. You should be
scanning the forum to see if other users are having similar problems and finding solutions using the Search block at the top of the
AI2 forum page.
There are many ways to save a high score.
1) game high score replaces global high score. Only the highest score ever achieved is posted.
High Score: 213 global high score is the only score saved in the TinyDB.
There are issues here. Unless there is code to compare the game score with the HighScore, the game score
may end up replacing the Highest Score. You will need a Math block to check which score is greater and logic blocks
to tell the app which score to save.
2) all scores achieve are posted but the scores are not sorted. You are going to have to create a list of scores probably and then sort it.
2) all scores are recorded along with the 'users' initials or name
In this case, before a score is logged into the database, a text box appears where the user can input his/her
name or initials. EVERY score is logged. You will need tags like SJG, TAM, JM or Steve rather than a single highscore tag. To show
the scores, you will need to save the scores of each user from the database into a list, for example, then print out the results in a
label. possibly using the \n characters to force line changes in the label.
You can record only the highest score for each tag unless you include more information in the tag, for instance the time.
You as a developer need to provide the logic for the type of high score display you want.
I am not solving your issues, here. I am only attempting to explain why the results you are coding are different than you expect.