Are those scored being saved? Can you show screen snips of where you’re saving the data? And what happens if you don’t limit the query to 5 records?
So you’ve managed to check FireBase and see the values in there? Also, when you write to FireBase, you’re not checking the result. How do you know if it’s succeeded?
If you show all the scores, and they’re all less than 100, then that suggests there are no scores getting saved that are over 100.
Can I suggest you put add an event to write a test name with a score of 150, and see if that gets read in (yes, hard code a score getting added).
----So you’ve managed to check FireBase and see the values in there?
Yes, the values are there even the scores >100. When I saw that I had players with 114 or 120 score in firebase, I realized that the ranquing is not show those records.
—Can I suggest you put add an event to write a test name with a score of 150, and see if that gets read in (yes, hard code a score getting added).
I did this experiment and …add and write to firebase fine. That’s why I dont get what happens.
I’m curious on how FireBase works when a query is run multiple times.
With the event from your first post, is that being called multiple times? Can you put a trigger once on the first event, and make the second event a subevent off it, so it the whole lot only gets run once?
Sorry, we’re scratching a bit here, because I can’t see an issue with your query.
Multiple users similar issues, because they stored the score as a string and not as a number, so the ordering is made alphabetically instead of by the biggest number. That would make scores like 100 go at the bottom since the first “letter” 1 is smaller than the first “letter” 9 from 90.
Make sure you store your scores as numbers, not strings.