From 073c2288e3a238360c5770e1fcc8d7368818c3e5 Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Fri, 3 May 2019 00:27:59 -0500 Subject: [PATCH] Fix: crash in player_events --- player_events.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/player_events.lua b/player_events.lua index c6ad138..c572cff 100644 --- a/player_events.lua +++ b/player_events.lua @@ -64,19 +64,20 @@ minetest.register_on_leaveplayer( return end factions.onlineplayers[facname] = nil - on_death[pname] = nil + on_death[name] = nil end end ) minetest.register_on_respawnplayer( function(player) - local faction, facname = factions.get_player_faction(player:get_player_name()) + local name = player:get_player_name() + local faction, facname = factions.get_player_faction(name) if not faction then return false else - on_death[pname] = nil + on_death[name] = nil if not faction.spawn then return false else