forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

access to arrays in arrays

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Mon Oct 17, 2005 2:54 am    Post subject: access to arrays in arrays Reply with quote

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
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Mon Oct 17, 2005 3:37 am    Post subject: Reply with quote

Code:
print(Borders[1][1])

_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group