From 21005455ab4b9edd07bd886cd7c6568655404413 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Wed, 7 Feb 2024 22:18:15 +0100 Subject: [PATCH] added some missing local variables in fs/fs_talkdialog.lua --- fs/fs_talkdialog.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/fs_talkdialog.lua b/fs/fs_talkdialog.lua index aa84b49..d828dd7 100644 --- a/fs/fs_talkdialog.lua +++ b/fs/fs_talkdialog.lua @@ -13,11 +13,13 @@ yl_speak_up.input_talk = function(player, formname, fields) return end local n_id = yl_speak_up.speak_to[pname].n_id + local d_id = yl_speak_up.speak_to[pname].d_id + local dialog = yl_speak_up.speak_to[pname].dialog -- the NPC needs to be configured first; route input to the configuration dialog - if(not(yl_speak_up.speak_to[pname].dialog) - or not(yl_speak_up.speak_to[pname].dialog.n_npc) - or not(yl_speak_up.speak_to[pname].d_id)) then + if(not(dialog) + or not(dialog.n_npc) + or not(d_id)) then yl_speak_up.input_fs_initial_config(player, formname, fields) return end @@ -146,7 +148,7 @@ yl_speak_up.input_talk = function(player, formname, fields) -- we may soon need actions and o_results from the selected_option local selected_option = {} - if(yl_speak_up.check_if_dialog_has_option(dialog, d_id, o)) then + if(yl_speak_up.check_if_dialog_has_option(dialog, d_id, o)) then selected_option = dialog.n_dialogs[d_id].d_options[o] end