(sos!) Help me fix some problem for my Sorting (name and score)

when i using tinyDB, it can show up different score stored in highestscorelist:


But when I changed to CloudDb(bcz I need to use online database), it only show up one score, and keep replace the new highest score, but only show 1 highest score on screen , why ???


IS THERE ANY MISTAKE I MADE FOR THE CLOUDB SECTION?

this is my assignment requirement:

Do you have 2 blocks when Bomb CollidedWith ? because in your images I see a red :x:

ya that is for reference purpose. bcz after I change to clouddb, I never delete the bomb with the tinydb version(I want to keep it for reference since tiny version can work well). When I run the app, I did delete the bomb with tiny version, but the result with the clouddb bomb is no what I expected

I guess the main problem might be in the cloudDb part...

im no sure whether my sorting section is correct or not, but supposedly it should be alright since i use the same sorting block with previous tinyDb version, it can show up correct order with different score.

What happens if you move the blocks shown in image in when CloudDB Got Value ? Does it work ?

1 Like

omg....so incredible, it works well !!!!!! Love u!!!! Thanks so much!! :heart_eyes: (now it show up different score)

1 Like

i just realize the output didnt sort the score from lowest to highest, is there any problem with my sort block(the getHighScore block)

the output show this: 10, 0, 20, 50 ( after I wait a few minutes, it start showing 0,10,30,40(no even 50!)
. Why ???

also, i got 1 question, how can I motify this sortblock to limit it to store only 5 highestscore:

Since I don't want to recreate your procedure, right click on block , choose download Blocks as Png and upload it here to test it

Try this

image

Hi, i got same issue after changed to this

first show up this:

after few minutes:
image

Use a different sorting algorithm perhaps.

https://imagnity.com/tutorials/app-inventor/list-sorting-on-app-inventor/

Use this procedure for sorting in both ascending and descending numeral or alpha orders.

1 Like

Post a screenshot of your game page blocks. It isn't logical to wait minutes for the result

image


P.S. These blocks can be dragged directly into your Blocks Editor workspace.

Dragging blocks

1 Like

Maybe it is a clock issue, when game ends should you disable clock ? Set clock enabled and clock always fire to false ? and re enable them when new game starts ?


But i still get the same issues :rofl:


like this? bbut still got same issue:

Asking for the score list from CloudDB then immediately trying to process the top score list is impatient.

Move the processing to where you get the top score list back from CloudDB.

1 Like