Forums » Bugs

Lua Error - UnloadSellCargo

Jan 08, 2017 PaKettle link
Selling 33 Units of Industrial Research Supplies CSN# 34068

vo/vo_gamefuncs.lua:861: attempt to index local 'info' (a number value)
stack traceback:
vo/error.lua:71: in function <vo/error.lua:70>
vo/vo_gamefuncs.lua:861: in function 'move_cargo'
vo/vo_gamefuncs.lua:888: in function 'UnloadSellCargo'
plugins/FirstMate2.0/CargoUtilities.lua:31: in function 'SellShipCargo'
plugins/FirstMate2.0/CargoUtilities.lua:6: in function 'OffLoad'
plugins/FirstMate2.0/DayStar.lua:27: in function 'InitDayStar'
plugins/FirstMate2.0//GUI/DayStarControl.lua:17: in function <plugins/FirstMate2.0//GUI/DayStarControl.lua:10>
(tail call): ?

calling code ->

local CSN,NSN,OEM = FM.GetItemNumbers(name)
FM.Print (" Selling " ..amount.. " Units of " .. (name).. " CSN# ".. CSN)
UnloadSellCargo({CSN,amount}, nil)

This is old working code that suddenly quit working......
Jan 09, 2017 raybondo link
Strange that it used to work. The table needs to be:
{ {itemid=<itemid>, quantity=<amount>}, ... }
Jan 10, 2017 PaKettle link
Strange indeed - Perhaps it was an old bug you fixed LOL
Jan 10, 2017 PaKettle link
I changed it to the table format and its working ok but I am getting the addon error - I assume due to the same timing issue that autojett had.

Thanks for the spot Ray - I haven't seriously used this plug for a long while....I'm sure theres a few other bugs waiting :}