doctor152
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 308 |
|
|
| 15 Feb 2016 03:56 PM |
So I've recently encountered an issue which I never used to have. I would put tables within tables like so:
TestTable = { t1 = {"test"} t2 = {"test2"} }
And I would do this:
print(TestTable[1][1])
But recently it has returned a nil value and I'm unsure why. I have tried using metatables and it sort of fixes it but all it does it use the first table. I'm unsure whether it's always been like this and would like to know how to fix it. Thanks.
|
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
|
| 15 Feb 2016 03:59 PM |
TestTable[1] is nil. Try TestTable["t1"][1]
|
|
|
| Report Abuse |
|
|
doctor152
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 308 |
|
|
| 15 Feb 2016 04:00 PM |
Ah I didn't notice, thank you both.
|
|
|
| Report Abuse |
|
|