From 58e701fde1023a62f4532f975dcd5fa8d9c8445e Mon Sep 17 00:00:00 2001 From: Sokomine Date: Mon, 21 Jun 2021 00:43:09 +0200 Subject: [PATCH] took care of unregistered globals --- fs_edit_effects.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs_edit_effects.lua b/fs_edit_effects.lua index 2b4668b..d771d61 100644 --- a/fs_edit_effects.lua +++ b/fs_edit_effects.lua @@ -211,13 +211,13 @@ end -- Note: In edit mode, effects will *not* be executed. yl_speak_up.execute_all_relevant_effects = function(player, effects, o_id, action_was_successful) local target_dialog = "" + local pname = player:get_player_name() + local n_id = yl_speak_up.speak_to[pname].n_id if(not(effects)) then yl_speak_up.debug_msg(player, n_id, o_id, "No effects given.") -- no effects? Then...return to the start dialog return "" end - local pname = player:get_player_name() - local n_id = yl_speak_up.speak_to[pname].n_id local edit_mode = (yl_speak_up.edit_mode[pname] == n_id) -- Important: the list of effects is *sorted* here. The order remains constant! local sorted_key_list = yl_speak_up.sort_keys(effects) @@ -529,7 +529,7 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r) end end yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." ".. - "block: dig - success: "..tostring(dig_res).." at pos "..pos_str..".") + "block: dig - success: "..tostring(node.name).." at pos "..pos_str..".") return true -- "Punch the block.", -- 4 elseif(r.r_value and r.r_value == "punch") then