Fixed other errors

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

No files matched your search

+1 -1
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