mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-09-26 12:56:24 +02:00
do not crash in case of error
This commit is contained in:
parent
d1ba5f1ce5
commit
73d16ae76a
@ -1145,6 +1145,11 @@ local function get_fs_talkdialog(player, n_id, d_id)
|
|||||||
|
|
||||||
-- Now we have a dialog to display to the user
|
-- Now we have a dialog to display to the user
|
||||||
|
|
||||||
|
-- do not crash in case of error
|
||||||
|
if(not(active_dialog)) then
|
||||||
|
minetest.chat_send_player(pname, "Ups! Something went wrong. Please try again.")
|
||||||
|
return
|
||||||
|
end
|
||||||
local allowed = calculate_displayable_options(pname, active_dialog.d_options)
|
local allowed = calculate_displayable_options(pname, active_dialog.d_options)
|
||||||
yl_speak_up.speak_to[pname].allowed = allowed
|
yl_speak_up.speak_to[pname].allowed = allowed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user