From 6700266ff63bee78b05b3902d68aae07b339f1ad Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Mon, 3 May 2021 17:40:03 -0700 Subject: [PATCH] Add debug to help catch ctf_marker crash --- mods/ctf/ctf_marker/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ctf/ctf_marker/init.lua b/mods/ctf/ctf_marker/init.lua index 9c9d348..4312d00 100644 --- a/mods/ctf/ctf_marker/init.lua +++ b/mods/ctf/ctf_marker/init.lua @@ -37,12 +37,16 @@ function ctf_marker.add_marker(name, tname, pos, str) local team = ctf.team(tname) + if not tname then + minetest.log("error", "Team name not provided to ctf_marker.add_marker()") + end + teams[tname] = { players = {}, time = 0 } - for pname, _ in pairs(team.players) do + for pname in pairs(team.players) do local tplayer = minetest.get_player_by_name(pname) if tplayer then teams[tname].players[pname] = tplayer:hud_add({