Got crashes in a debug line while trying to sell:
Code:
LuaError
error running function `Main': ../lua/net/net.trade.lua:140: attempt to index field 'item' (a nil value)
LuaStackTrace:
../lua/net/net.trade.lua:140: in function `handler'
../lua/lib.protocol.lua:84: in function `HandlePacket'
../lua/lib.protocol.lua:52: in function `HandlePackets'
..//lua/main.lua:654: in function `MainStep'
..//lua/main.lua:589: in function <..//lua/main.lua:467>
..\lugre\src\lugre_main.cpp:221:Lugre::Lugre_Run
..\lugre\src\lugre_game.cpp:19:Lugre::cGame::Run
..\lugre\src\lugre_scripting.cpp:271:Lugre::cScripting::LuaCall
..\lugre\src\lugre_scripting.cpp:217:Lugre::LuaErrorHandler
PrintLuaStackTrace:
LuaStackTrace:
I replaced the line 140 with this code and the crashes are gone:
Code:
if (good.item) then
print("kPacket_Shop_Sell",hex(good.itemserial,8),hex(good.itemartid),hex(good.item.artid),good.price,good.name)
else
print("kPacket_Shop_Sell",hex(good.itemserial,8),hex(good.itemartid),"(nil)",good.price,good.name)
end
Keep up the good work, i am enjoying my first contact with UO and Iris2!
lk14