Using market
Posted: Fri Feb 28, 2014 3:53 pm
control.lua :
When i am trying to create new game with my scenario i have notice window "Error while running the oninit: ...|control.lua:3: No such node (name)".
Am i did something wrong? What is mysterious node "name"?
This example (3rd string) is from factorio wiki, so why it doesnt work? In "Tight spot" campaign is same syntax, but this campaign wont work as on 0.9.1, as on 0.8.8
Is this a incompatibility, and only way to use market is version 0.7.5, as noted in scenario pack? Or where i can find description of new syntax?
Code: Select all
game.oninit(function()
local market=game.getentitybytag("market")
market.addmarketitem({price={"iron-ore", 10}, offer={type="give-item", item="copper-ore"}}) --Adds market offer, 1 copper ore for 10 iron ore.
market.addmarketitem({price={"coin", 10}, offer={type="give-item", item="iron-plate"}})
end)
Am i did something wrong? What is mysterious node "name"?
This example (3rd string) is from factorio wiki, so why it doesnt work? In "Tight spot" campaign is same syntax, but this campaign wont work as on 0.9.1, as on 0.8.8

Is this a incompatibility, and only way to use market is version 0.7.5, as noted in scenario pack? Or where i can find description of new syntax?