| View previous topic :: View next topic |
| Author |
Message |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Mon Oct 17, 2005 2:54 am Post subject: access to arrays in arrays |
|
|
Say I have following code (don't mind spelling in code, just to give you an idea)
| Code: |
Borders = {}
LeftBorders = {}
LeftBorders[1] = 54
LeftBorders[2] = 34
Borders[1] = LeftBorders
|
How can I acces the value of LeftBorders[1]?
I tried | Code: | | print(Borders[1[1]]) |
to print the value of LeftBorders[1] to the winXP console running the lua emulator, but it gave me an error. Something like: expected ']' near '['
Anyone knows a solution? |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Mon Oct 17, 2005 3:37 am Post subject: |
|
|
| Code: | | print(Borders[1][1]) |
_________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
|