Page 1 of 1

(technology): No such node (type)

Posted: Wed Mar 02, 2016 1:47 pm
by lyravega
I am getting this "(technology): No such node (type)" error if I try to create a new technology entry table, and insert it to data.raw.technology

However, if I do the commented code below, I get no such errors. Am I missing something very simple here?

Code: Select all

local entry = {
	type = "technology",
	name = "test",
	icon = "__test__/graphics/icons/test.png",
	effects = { type = "unlock-recipe", recipe = "testRecipe" },
	unit = {
		count = 20,
		ingredients = { {"science-pack-1", 1}, {"science-pack-2", 1}, {"science-pack-3", 1} },
		time = 5
	},
	--order = "x-x",
	prerequisites = {"automation-2", "advanced-electronics", "logistics-2"}
}

-- local entry = util.table.deepcopy(data.raw["technology"]["automation"])
-- entry.name = "test"
-- entry.icon = "__test__/graphics/icons/test.png"
-- entry.effects = {{ type = "unlock-recipe", recipe = "testRecipe" }}
-- entry.prerequisites = {"automation-2", "advanced-electronics", "logistics-2"}

data.raw[entry.type][entry.name] = entry

Re: (technology): No such node (type)

Posted: Fri Apr 22, 2016 6:33 pm
by XyLe
yes, you're missing extra brackets in the "effects". hope that helps