Creating a recipes list

So basically i want a table for all recipes and equipment. I thought i can do somethint like this but clearly not since it throws errors, what do i do. module script btw

local recipes = {}
recipes.bowl = {
	recipes.bowl.simple = {
		dough = {"Wheat"}
	}
	recipes.bowl.complex = {
		cake = {"Sugar", "Egg", "Wheat"}
	}
	
}

return recipes

Try replacing recipes.bowl.simple with just Simple instead, same with the complex table.

local recipes = {}

recipes.bowl = {
	Simple = {
		["Dough"] = {"Wheat"}
	}
	Complex = {
		["Cake"] = {"Sugar", "Egg", "Wheat"}
	}
	
}

return recipes

To get dough ingredients for example, you would use recipes.bowl.Simple.Dough.

2 Likes

You forgot the commas.

Oh, and other stuff too, like what @J_Angry mentioned.

local recipes = {}
recipes.bowl = {
	simple = {
		dough = {"Wheat"},
	},
	complex = {
		cake = {"Sugar", "Egg", "Wheat"},
	},
	
}

return recipes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.