fix crash

This commit is contained in:
Sokomine 2021-05-30 21:21:43 +02:00
parent a6b7ff0d8e
commit cfd300ac5d

View File

@ -368,6 +368,9 @@ yl_speak_up.input_add_trade_simple = function(player, formname, fields)
yl_speak_up.add_trade_simple_return_items(player, trade_inv, pay, buy)
local dialog = yl_speak_up.speak_to[pname].dialog
if(not(dialog.trades)) then
dialog.trades = {}
end
if(dialog.trades[ trade_id ] and dialog.trades[ trade_id ].d_id) then
yl_speak_up.speak_to[pname].trade_id = trade_id
-- tell the player that the new trade has been added