Page 1 of 1

Modding: Defined variable causing errors

Posted: Wed Mar 29, 2017 1:39 am
by 3l1j4hx
I'm making a test mod, and after 25 or so failed attempts leading to fixed errors I'm completely stumped by this. When I load the game, Factorio says "no such node (name)" almost as if the name variable was left undefined. Here's my code:

Code: Select all

data:extend({
	{
		type="recipe",
		name="catRecipe",
		enabled="false",
		ingredients={
			{"alien-artifact,50"}
		},
		result="Cat"
	}
})
I am moderately experienced in Lua, but I have made large mistakes caused by small errors in the past. As of now, I have no idea what is wrong.

Re: Modding: Defined variable causing errors

Posted: Wed Mar 29, 2017 1:46 am
by 3l1j4hx
I see it now. The "alien-artifact" string also encapsulates 50, the amount of artifacts needed.