✅ Leaderboard Sorting

If I want to take multiple leaderboards formatted EXACTLY like this in a string variable (Shown in the attached image) does anyone know how I could store every Players stats in varibles to keep track of their total kills and other statistics with multiple leaderboards? (I know the format on this is not ideal, but I cannot change it, as I'm making a system to organize these stats from a 3rd party program)
No description
4 Replies
mg
mg2mo ago
are those all spaces? or are there tabs mixed in if there aren't tabs mixed in you can use yourString.Split(' ', StringSplitOptions.RemoveEmptyEntries) on each line and you'll be left with each stat (though for usernames with spaces, you'll need to figure something out) to handle the usernames with spaces, maybe parse from both ends, because all the other fields won't contain spaces or see if the external service can get you a CSV or other better format
Pobiega
Pobiega2mo ago
You could quite easily do this with a regex, as or mg suggested parsing from both ends (again, assuming all spaces). If there are tabs involved as separators, you can do the split above but with '\t' as your separator. Then, just map each column to the desired property on your Player object.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2mo ago
If you have no further questions, please use /close to mark the forum thread as answered

Did you find this page helpful?