From 0dd02dc780cbf68193eb06ac7ce123da94267883 Mon Sep 17 00:00:00 2001 From: upsilon Date: Tue, 21 Feb 2017 18:16:55 +0100 Subject: [PATCH] Fix table sorting function The ranking order was inverted --- tournament.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tournament.lua b/tournament.lua index 00b7f27..76f16e5 100644 --- a/tournament.lua +++ b/tournament.lua @@ -118,7 +118,7 @@ function pvpplus.stop_tournament() score = tournament.sent_damages[name] - tournament.received_damages[name] + tournament.kills[name] * 20 }) end - table.sort(rating, function(a, b) return a.score < b.score end) + table.sort(rating, function(a, b) return a.score > b.score end) -- Print it -- It won't look good if the font used in the chat and the formspec textarea isn't monospace.