Modding: Defined variable causing errors

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
3l1j4hx
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Mar 29, 2017 1:23 am
Contact:

Modding: Defined variable causing errors

Post 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.
3l1j4hx
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Mar 29, 2017 1:23 am
Contact:

Re: Modding: Defined variable causing errors

Post by 3l1j4hx »

I see it now. The "alien-artifact" string also encapsulates 50, the amount of artifacts needed.
Post Reply

Return to “Technical Help”