Black Market (sell and buy on the market) deprecated


Sell and buy items/fluids/energy on the universal 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.

Overhaul
5 years ago
0.13 - 0.17.1
57

b table.each from stdlib doesn't exist (for Gold Mining optional dependency)

5 years ago
(updated 5 years ago)

Hi,

at prototypes/extenstions/goldmining.lua:38 you're using table.each(), table imported from stdlib/utils/table, but it throws error "attempt to call 'each' (a nil value)", and as per https://github.com/lua-stdlib/lua-stdlib/blob/master/lib/std/table.lua the each() function does not exist.

I found this one http://afforess.github.io/Factorio-Stdlib/modules/Utils.table.html where each() does exist, so I'm not sure why it's throwing this error.

I'm using Factorio 0.17.16 experimental.

5 years ago

Hello,

i have the same error.

grtz
nidwid

5 years ago

I've been trying to resolve several other incompatibilities (I threw together a bunch of mods by thinking "that sounds nice click), and asked around while slowly learning more about LUA and Factorio modding, and was pointed to using for k,result in pairs(data.raw.recipe["gold-processing"].results) do instead of each().

I have no idea why it's not using the packaged stdlib where each() is actually defined for table.

5 years ago

Im Getting this error as well.

I deleted the following from Blackmarket_1.2.1.zip\prototypes\extensions\goldmining.lua and got the game to load.
From what the note says and what I know of Lua, its changing something within goldmining, I think one of the stone processing recipes and faulting out. Getting rid of the change gets rid of the problem.
"
-- slighty update gold processing technologies to not waste stone
table.each(data.raw.recipe["gold-processing"].results, function(result)
if result.name == "stone" then
result.amount = 3
end
end)
"

Loaded a previous factory which did not have the mod, and it loaded just fine. Technology's are present. Buy & Sale of items works fine. Havent tested Fluids or Power but I think your Gold. (Pun Intended, #NotSorry)

New response