Need Help with leaderboard/scorebaord

Hello. I am in need of some serious help. I am doing a quiz for my project. For that project I need to display the top 5 scores and overwrite one of the top 5 scores if someone gets a higher score. I am Firebase Realtime data base for my data storing. I can't display any relevant data on my list view and and don't really know how to do an automatic top 5 updating scoreboard.






Is there ant solution or help I can get for this? Thank you

Hope this will help you [Free] Lists Extension an extension for arrange in ascending order, descending order, get min/max value

1 Like

I will try it out.

2 Likes

Comparing numbers with a text compare block gives you anomalies.
(See attached.)

You need to separate out the numbers from the text and compare them using math blocks.

Samples:

2 Likes

I have actually changed back to using CloudDB due to easier usage. It displays data now, but I need to limit it to the top 5 high scores and if a new high score is detected it needs to overwrite the previous high score. Also my data is displayed in an erratic and volatile manner. So if I may ask can I send in my aia for you to maybe a take look at it and somewhat help me solve it as I have no idea.
Assignment2_Kindergarten_Education_Game_Full.aia (540.0 KB)
Again thank you so very much for the help. Very grateful to everyone whom decided to help

1 Like

I am going offline for a day, so I leave this for any one available who can help you in the meantime.

1 Like

If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks... Note: your relevant blocks, NOT all blocks...

To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Your Sort_Ascending procedure is not correct, create a simple list and try to sort it.

sortttt

2 Likes

Yep completely understandable. I do apologies for asking help. I am completely lost in using this app and I have no idea where my mistake is which lead to me basically posting my entire block set. But I will attempt to solve of it to the best of my abilities. Again I do apologies. Thank you for the help.

@MAJAR

Here is another example of an ordered list.
The information is saved in lists, if you want to keep it when you change the screen or restart the application, you must save the list in a TinyDB.

ordena10

p51i_ordenar_lista_2.aia (3.5 KB)

2 Likes

Is there one with CloudDB. Cause I changed it back.

At the beginning of the btn_ordena, CloudDB.GetValue list_name and list_points.

At the end of btn_ordena, CloudDB.StoreValue list_name and list_points

1 Like


Hey I tried out your method but I am getting a lot of errors and a certain runtime error :(The operation Elements cannot accept the arguments: , ["Jeffery"]) keeps on repeating and data seemed to have overflowed so I am not sure where my errors are. Again all my blocks for the pervious two screens are up there plus the new one here I tried with yours. Also does not want to stack into top 5 and overwrite top score as well.

1 Like

You cannot use a list as a tag.

You do not have to assign one value into a variable to clear it before assigning another value to overwrite it.

Decide how you want to store user names and scores in CloudDB (what tags and values) and tell us.
Use the words one and many to clarify where you use and don't use lists.

2 Likes

To store the the user name I would like the database to store the names and score side by side.
Such as Player Name : (Score). I need to limit to 5 as well and the highest to lowest in ascending order. Also if there is a higher score incoming it needs to replace the previous high score. I don't fully understand this Use the words one and many to clarify where you use and don't use lists. I am not sure if my previous two screens are effecting the blocks as well (see my original post). I am getting massive errors from this so I am not sure if I should add initialize more global's as well. My aia file is still up there but its not the updated version I did as I have already reverted back to my original list version you see in my original post.

Another version with CloudDB.

p51i_ordenar_lista_3.aia (5.1 KB)