Fixed other errors

This commit is contained in:
Cooldude2606
2021-05-06 01:10:54 +01:00
parent 6e00b2cd40
commit ecf2c59bb1
4 changed files with 5 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ local function sort_players(players, func)
for index, player in ipairs(players) do
local value = func(player)
-- Check if the item will make the top 5 elements
if value > threshold or index <= 5 then
if index <= 5 or value > threshold then
local inserted = false
values[player] = value
-- Find where in the top 5 to insert the element