Black Market 2

by djmango

Sell and buy items/fluids/energy on the black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.

14 days ago
0.17 - 2.0
20.8K

b Coal buy bug

3 years ago

I am running version 2.0.5 of the mod (first time using this mod, no previous versions used), and I am still getting the nil coal error when clicking the button to add an item to a buy chest's list to buy. Coal is not in the list of items with prices.

modlist: https://pastebin.com/1mMyk5Rc

Error from log:
131.495 Error MainLoop.cpp:1285: Exception at tick 1712358: The mod Black Market 2 (2.0.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event BlackMarket2::on_gui_click (ID 1)
BlackMarket2/control.lua:2681: attempt to index field 'coal' (a nil value)
stack traceback:
BlackMarket2/control.lua:2681: in function <BlackMarket2/control.lua:2398>

3 years ago
(updated 3 years ago)

Not creator, but replacing line 2681 with "table.insert(trader.orders,1,{name="ucoin", count=0, price=global.prices["ucoin"].current})" should fix that.

New response