From cfd300ac5d329774dac018e056c2e6af4c50d023 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 30 May 2021 21:21:43 +0200 Subject: [PATCH] fix crash --- trade_simple.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trade_simple.lua b/trade_simple.lua index 1d9a8db..d3dac44 100644 --- a/trade_simple.lua +++ b/trade_simple.lua @@ -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