I’m building a game with a high scores list, and I can’t seem to get the the high score inputed into the right part of the list.
Here’s the problem replicated in a new app.
In this app, just make sure you click on the label to add the items to the list.
Then try adding in numbers, and you’ll soon realize the numbers are not being added in the correct spot. I’m wondering if the first occurrence of item block is the problem.
I’m not sure if on the backend it is looking at these numbers as a string instead of integers. Because of that it is thinking that the first number in a 2 digit number is the one that it compares…
Are you sure you want to use the TextInput changes block here? This means that if you enter a two digit number the cloud points variable will change twice…three times for 3-digit numbers, and so on.
Can you clarify this part please. i.e:
“When the game ends I want the score to be added to the end of the list”
or
“When the game ends, the score should be inserted in numerical order into the list”
Hi,
The “When text input changes” is just used for testing purposes. In the game it it triggers when the lives = 0.
To clarify, I’d like the number to be added to the list in order from greatest to least.
Thank you!