Posted 18 September 2014 - 03:30 AM
So, as the title asks, how would I access a table inside of a table? I've already looked this up and tried what I found in CC and it failed to work.
This is what I found:
However, that doesn't seem to work. I know for a fact that I can do this:
But, I want to also be able to change the data variable inside of the table. So, is there something I'm doing wrong? Or, did I get misinformation? I apologize for my ignorance in advance. :P/>
This is what I found:
local table = {
[1] = {
data = "stuff",
}
}
-- The article I read stated this:
print(table[1][data])
However, that doesn't seem to work. I know for a fact that I can do this:
local ref = table[1]
print(ref.data)
But, I want to also be able to change the data variable inside of the table. So, is there something I'm doing wrong? Or, did I get misinformation? I apologize for my ignorance in advance. :P/>