From dde410ee8d9b0bb8aa357ded99bb2a61cd1f63d9 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 19 Apr 2018 00:57:21 +0100 Subject: [PATCH] Fix crash on /rankings --- mods/ctf_stats/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ctf_stats/init.lua b/mods/ctf_stats/init.lua index bdcd441..a212355 100644 --- a/mods/ctf_stats/init.lua +++ b/mods/ctf_stats/init.lua @@ -41,6 +41,8 @@ function ctf_stats.load_legacy() end player_stats.wins.blue = player_stats.wins.blue or 0 player_stats.wins.red = player_stats.wins.red or 0 + + player_stats.bounty_kills = player_stats.bounty_kills or 0 end ctf_stats.matches.wins = ctf_stats.matches.wins or { @@ -114,12 +116,11 @@ function ctf_stats.player(name) captures = 0, attempts = 0, score = 0, + bounty_kills = 0, } ctf_stats.players[name] = player_stats end - player_stats.bounty_kills = player_stats.bounty_kills or 0 - local match_player_stats = ctf_stats.current.red[name] or ctf_stats.current.blue[name]