AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Sorting a tree of Key Values (https://forums.alliedmods.net/showthread.php?t=318556)

dustinandband 09-07-2019 04:22

Sorting a tree of Key Values
 
Had someone request a mod that includes a !top10 command - which outputs the top 10 highest times per map.
He requested that it be done without a database (so using key values & a local cfg file).

I'm about 70% done, but trying to figure out a way to sort the "leaderboard_times" -> "highest_times" -> "MAP NAME HERE" categories, since I'll need to associate a round ID with each time, while rearranging it.

I thought about rearranging the CFG file so directly underneath the map name, is the rank (#1 - 10), then the Round ID & time associated with it. But it still seems cumbersome.

https://i.imgur.com/fbIeHtM.png
https://i.imgur.com/g0v9EX5.png

Any suggestions?

sample CFG
Spoiler

zipcore 09-07-2019 05:02

Re: Sorting a tree of Key Values
 
Customer knows whats good for him KAPPA


All times are GMT -4. The time now is 01:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.