mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-06-29 02:28:03 +02:00
fixed crash attempt to index field 'd_options' #13
This commit is contained in:
parent
d0e7b23127
commit
212809d380
@ -160,18 +160,18 @@ yl_speak_up.get_fs_edit_option_dialog = function(player, n_id, d_id, o_id, calle
|
||||
local pname = player:get_player_name()
|
||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||
local n_dialog = dialog.n_dialogs[d_id]
|
||||
local d_option = n_dialog.d_options[o_id]
|
||||
|
||||
-- currently no trade running (we're editing options)
|
||||
yl_speak_up.trade[pname] = nil
|
||||
yl_speak_up.speak_to[pname].trade_id = nil
|
||||
|
||||
if(not(d_option)) then
|
||||
if(not(n_dialog.d_options) or not(n_dialog.d_options[o_id])) then
|
||||
return "size[6,2]"..
|
||||
"label[0.2,0.5;Ups! Option "..minetest.formspec_escape(tostring(o_id))..
|
||||
" does not exist.]"..
|
||||
"button_exit[2,1.5;1,0.9;exit;Exit]"
|
||||
end
|
||||
local d_option = n_dialog.d_options[o_id]
|
||||
|
||||
-- offer the correct preselection for hidden/grey/show text
|
||||
local alternate_answer_option = "3"
|
||||
|
Loading…
Reference in New Issue
Block a user