Help adding a leaderboard - due tomorrow :(

I have a simple snake game app that I wanted to add a top 5 highscores to. I have a sort procedure that is called in my overall high score procedure but i removed it so that is not the problem. I keep getting this runtime error(4 is the score the player just got)


What if CloudDB returns something for the high score list but it's not a list?

You need more code to detect that and to complain.

There is an Is a List block you can use.

Also, what if you received a value from a different tag?

how would I add that? would that be in "when CouldDB GotValue", call CloudDB, or neither? I also have that tag when I initialize
Screenshot 2024-04-23 at 9.45.40 PM
the screen

I changed the section to iOS because I am not sure if iOS supports CloudDB yet.

The place to check the tag and value is in the gotValue event block.

https://doesappinventorrunonios.com/

Says CloudDB is not supported on iOS.

Correction - I didn't check the details on CloudDB.

It should be working enough for your needs.

But you need to check your incoming data.

(If then Notify etc )

Ahh I'm going to see what I can do Thank you

could i use tinyDB the same way or should i go a different way?

For your scorelist request, the default value should be a list of 5 zeroes, not an empty list.

Otherwise when you blindly try to select item 5, you will fall off the end of the list with an error message.

I am not sure how you came to this conclusion. CloudDB is definitely supported and the website reflects that (sans one event handler add more recently).

Sorry, I was in a rush and did not dive down into the component's entry, and only worked from the bar chart.

I mis-interpreted all the colors in the bar chart.
I thought the colors were levels of completion, and not the distribution of block types.

I later went back into the details, and saw my mistake.

i figured it out using tinywebDB thank you so much for your help