forked from your-land-mirror/yl_speak_up
catch bug when an added option is discarded
This commit is contained in:
parent
cc5bfd01f6
commit
6b3e4f8fd8
@ -17,10 +17,13 @@ yl_speak_up.input_edit_option_dialog = function(player, formname, fields)
|
|||||||
|
|
||||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||||
local n_dialog = dialog.n_dialogs[d_id]
|
local n_dialog = dialog.n_dialogs[d_id]
|
||||||
if(not(n_dialog)) then
|
if(not(n_dialog) or not(n_dialog.d_options)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local d_option = n_dialog.d_options[o_id]
|
local d_option = n_dialog.d_options[o_id]
|
||||||
|
if(not(d_option)) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if(fields.switch_tab and fields.switch_tab == "2") then
|
if(fields.switch_tab and fields.switch_tab == "2") then
|
||||||
yl_speak_up.show_fs(player, "edit_option_dialog",
|
yl_speak_up.show_fs(player, "edit_option_dialog",
|
||||||
|
Loading…
Reference in New Issue
Block a user