#8 and #10 fixed bug with d_options beeing nil

This commit is contained in:
Sokomine 2021-05-04 00:36:15 +02:00
parent 76ba4075d1
commit 319f05edc5

View File

@ -2340,6 +2340,11 @@ minetest.register_on_player_receive_fields(
local n_dialog = dialog.n_dialogs[d_id]
-- if there are no options, there can be no results either
if(not(n_dialog) or not(n_dialog.d_options)) then
return
end
local d_option = n_dialog.d_options[o]
-- Let's do something if results exist