From 8a685dc211cf7b831328470cb1f68944da45eeda Mon Sep 17 00:00:00 2001 From: Sokomine Date: Fri, 14 May 2021 23:23:26 +0200 Subject: [PATCH] handled undeclared globals --- functions.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions.lua b/functions.lua index 35bb3b3..23be918 100644 --- a/functions.lua +++ b/functions.lua @@ -2716,7 +2716,7 @@ minetest.register_on_player_receive_fields( -- if in edit mode: detect if something was changed; if(edit_mode or fields.button_edit_name_and_description) then - result = yl_speak_up.edit_mode_apply_changes(pname, fields) + local result = yl_speak_up.edit_mode_apply_changes(pname, fields) end -- the player wants to change name and description; show the formspec @@ -3439,6 +3439,8 @@ minetest.register_on_player_receive_fields( --fashion return end + local n_id = yl_speak_up.speak_to[pname].n_id + -- only change cape if there really is a diffrent one selected if fields.set_cape and fields.set_cape ~= textures[1] then -- only set the cape if it is part of the list of allowed capes @@ -3544,7 +3546,7 @@ yl_speak_up.set_muted = function(p_name, obj, set_muted) return end local npc = luaentity.yl_speak_up.id - npc_name = luaentity.yl_speak_up.npc_name + local npc_name = luaentity.yl_speak_up.npc_name -- fallback if(not(npc_name)) then npc_name = npc