My brain is kind of exploding because I can’t really imagine what this would be like.
I have a table of tables of tables - it can be any number of sub tables and sub tables within those sub tables. You don’t know. Here’s the table
[lua]PATHS = {
NAME = “Base”,
TEXTURE = “”,
WEAPONS = {},
CLASSES = {
[1] = {
NAME = "Bourgeois",
TEXTURE = "",
CLASSES = {
[1] = {
NAME = "Cook",
CLASSES = {
[1] = {
NAME = "Chef",
CLASSES = {},
SKILLS = {
},
},
},
SKILLS = {
},
},
},
SKILLS = {
},
WEAPONS = {
"weapon_physcannon",
"gmod_camera",
},
},
[2] = {
NAME = "Intellectual",
TEXTURE = "",
CLASSES = {
},
SKILLS = {
},
WEAPONS = {
"weapon_physcannon",
"gmod_camera",
},
},
[3] = {
NAME = "Military",
TEXTURE = "",
CLASSES = {
},
SKILLS = {
},
WEAPONS = {
"weapon_physcannon",
"gmod_camera",
},
},
},
}[/lua]
I’m trying to make a function, PATHS:GetPathByName, that finds the table of the path if the name is equal to the argument. How exactly would you do that?
oops Rate me bad spelling, I meant recursive.