My code is below for an example of what I'm trying to achieve.
When I compile a similar code structure to this I get the error "attempt to index a nil value global table2". I understand that if I move table2 above table 1, this error will clear itself. However, I want to be able to refer back to either table at any point in my script.
So if I'm at table11, I want to be able to reference table3 without needing to reorder my script.
Is there something I'm missing here on how to traverse tables?
table1 = {
property1 = "string",
property2 = table1[1],
options = {
optionTable[1],
optionTable[2]
},
results = {
table2,
table3
}
}
table2 = {
property1 = "string",
property2 = table1[2],
options = {
optionTable[3],
optionTable[4]
},
results = {
table1,
table3
}
}