Evetor
|
  |
| Joined: 04 Mar 2013 |
| Total Posts: 4217 |
|
|
| 16 Apr 2014 04:33 PM |
print(TMain[1][1][1])
Gives me an error.
Is this even possible? |
|
|
| Report Abuse |
|
|
| |
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 16 Apr 2014 04:37 PM |
TMain = {1 = { 1 = {1 = "Hello"}}}
print(TMain[1][1][1])
My best guess is that the script is thinking that the [1] is what my example is up above, but it cannot find it. If you have something in dictionary format, like,
TMain = {["Hello"] = "Hi there";}
then you would use the following format for printing/calling in general:
print(TMain.Hello) |
|
|
| Report Abuse |
|
|
Evetor
|
  |
| Joined: 04 Mar 2013 |
| Total Posts: 4217 |
|
|
| 16 Apr 2014 04:50 PM |
http://wiki.roblox.com/index.php?title=File:DataStoreDiagram.png&filetimestamp=20140213223139
Example on the ROBLOX wiki
First I have one main array.
The first layer (Hat classes) is a container for the second layer (Hats) which is a container for the third layer (Color) which are mesh templates (StringValues.)
If I can't make arrayception, then what can I do other than having 400 lines of "TopHat_StripedTopHat_Green = templateid" |
|
|
| Report Abuse |
|
|
Evetor
|
  |
| Joined: 04 Mar 2013 |
| Total Posts: 4217 |
|
| |
|
|
| 16 Apr 2014 05:17 PM |
table1 = {"Stuff4Table1"} table2 = {table1,"Stuff4Table2"} table3 = {table1,table2,"Stuff4Table3"}
print(table.concat(table3)) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 16 Apr 2014 06:25 PM |
Yes it's possible.
local TMain={{{"Hi"}}} print(TMain[1][1][1]) |
|
|
| Report Abuse |
|
|
Evetor
|
  |
| Joined: 04 Mar 2013 |
| Total Posts: 4217 |
|
|
| 17 Apr 2014 04:57 AM |
Thanks Cnt, it works!
local TMain={{{"Hi","Bye"}}} print(TMain[1][1][2]) |
|
|
| Report Abuse |
|
|