From aa89b2d19d83f2c8017d50ff7b263206c666a0e9 Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Fri, 20 Oct 2023 09:52:07 -0700 Subject: [PATCH] Fix crash --- mods/ctf/ctf_modebase/features.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ctf/ctf_modebase/features.lua b/mods/ctf/ctf_modebase/features.lua index 8018428dbd..814c7281cb 100644 --- a/mods/ctf/ctf_modebase/features.lua +++ b/mods/ctf/ctf_modebase/features.lua @@ -3,6 +3,7 @@ ctf_core.testing = { -- -so I don't need to restart for every little change -- pkd, kd_diff, actual_kd_diff, players_diff, best_kd, worst_kd, total_players, worst_players, best_players --ctf_core.testing. + testing = true, test = function( pkd, kd_diff, actual_kd_diff, players_diff, best_kd, worst_kd, total_players, worst_players, best_players ) @@ -386,7 +387,8 @@ return { local player_rankings = recent_rankings.get(player) --[pteam.."_score"] if ctf_core.testing.testing then - if not rem_team or math.max(player_rankings[rem_team.."_kills"], player_rankings[rem_team.."_deaths"]) <= 6 then + if not rem_team or + math.max(player_rankings[rem_team.."_kills"] or 0, player_rankings[rem_team.."_deaths"] or 0) <= 6 then player_rankings = rankings:get(player) or {} else player_rankings.kills = player_rankings[rem_team.."_kills"] or 0