Drenkus
|
  |
| Joined: 03 May 2009 |
| Total Posts: 2380 |
|
|
| 03 Aug 2011 10:07 PM |
Is there a way for tables to work like this?
table={"Lol", "Hithar", "Yes."} |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
| |
|
AeroMcFly
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 546 |
|
|
| 03 Aug 2011 10:08 PM |
That will work. I prefer using semicolons though, but it really doesn't matter.
local t = { "abc"; "123"; } |
|
|
| Report Abuse |
|
|
Drenkus
|
  |
| Joined: 03 May 2009 |
| Total Posts: 2380 |
|
|
| 03 Aug 2011 10:08 PM |
| You still access it as, table[1] or table[2]? |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 03 Aug 2011 10:09 PM |
yep.
You can do
tablas={ {1,2,3}, {4,5,6}};
to make it act more like a matrix and then access like tablas[2][3] |
|
|
| Report Abuse |
|
|
AeroMcFly
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 546 |
|
| |
|
Drenkus
|
  |
| Joined: 03 May 2009 |
| Total Posts: 2380 |
|
|
| 03 Aug 2011 10:10 PM |
| I like that better, thank you. |
|
|
| Report Abuse |
|
|
Drenkus
|
  |
| Joined: 03 May 2009 |
| Total Posts: 2380 |
|
|
| 03 Aug 2011 10:18 PM |
| Made my tycoon buttons 100x more accessible. |
|
|
| Report Abuse |
|
|