Can help Me make a simple Leaderboard?

Okay. so I need help sorting the players.

In my server functions can happen in
if (btn == "buttonname"){
//function
}

I have a leaderboard menu made that I want to display the top #10 players based on their gem count...

On button click i want the server to read the gemcount files in the directory
and order them from biggest to smallest. then select the top 10 and display to menu..

The files are in same folder as exe in sub folders.
the path is 'gemdb/' and all gemcount files are named after the players and have the value inside.

ex: gemdb/davies99.txt
content in ex file is just 484839
simple number....

Can someone make this for me?

The Menu to update after new function can be found in the paste
https://pastebin.com/MRQWmK8J
>Can someone make this for me?
No, but we can help if you make a start.

What's your confusion?
- how to read from a single file?
- how to read from many files?
- how to store the data in an array/vector?
- how to sort that so the top 10 are arranged in order
- how to format that data so you can replace all these
 
store.addLabelWithIcon("`9#1 I Player: name I Gems: count", LABEL_SMALL);
Topic archived. No new replies allowed.