From 204b3cfc93347a544935411faf4d1b9f8e9ab435 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Fri, 27 Jan 2023 21:54:57 +0100 Subject: [PATCH] log disambigous npc in error log --- functions.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions.lua b/functions.lua index 11b8c60..3758ece 100644 --- a/functions.lua +++ b/functions.lua @@ -494,11 +494,15 @@ yl_speak_up.check_for_disambigous_results = function(n_id, pname) end end if(#dialog_results>1) then - minetest.chat_send_player(pname, "ERROR: Dialog ".. + local msg = "ERROR: Dialog ".. tostring(d_id)..", option "..tostring(o_id).. ", has multiple results of type dialog: ".. minetest.serialize(dialog_results)..". Please ".. - "let someone with npc_master priv fix that first!") + "let someone with npc_master priv fix that first!" + yl_speak_up.log_change(pname, n_id, msg, "error") + if(pname) then + minetest.chat_send_player(pname, msg) + end errors_found = true end end