From b11e3680499784ac235158473d5d07778c27ce66 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 8 Aug 2021 17:39:04 +0200 Subject: [PATCH] Fix nil warning --- mods/wielditem/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/wielditem/init.lua b/mods/wielditem/init.lua index eb49acc..3812eb7 100644 --- a/mods/wielditem/init.lua +++ b/mods/wielditem/init.lua @@ -76,7 +76,8 @@ minetest.register_on_joinplayer(function(player) end) minetest.register_on_leaveplayer(function(player) - wielditem[name] = nil + local name = player:get_player_name() + wielditem[name] = nil end) default.log("mod:wielditem", "loaded")