Anubhav Posted January 24, 2014 Share Posted January 24, 2014 As the topic says , make me understand it please k,v in ipairs -- and all Link to comment
Moderators IIYAMA Posted January 24, 2014 Moderators Share Posted January 24, 2014 myTable = {"Anubhav","IIYAMA","MTA","moderators", "super moderators", "admins"} --Is same as: myTable = { [1]="Anubhav", [2]="IIYAMA", [3]="MTA", [4]="moderators", [5]="super moderators", [6]="admins" } -- [1] is index number 1, defines the location of the information in a table. outputChatBox("test: " .. myTable[1]) --Anubhav outputChatBox("test: " .. myTable[2]) --IIYAMA outputChatBox("test: " .. myTable[3]) --MTA ----------------------------- for k,v in ipairs(myTable) do -- loop outputChatBox("index: " .. k .. ", Content: " .. v ) outputChatBox(v)--****** end Is same as:****** outputChatBox("Anubhav") outputChatBox("IIYAMA") outputChatBox("MTA") outputChatBox("moderators") outputChatBox("super moderators") outputChatBox("admins") Link to comment
Anubhav Posted January 24, 2014 Author Share Posted January 24, 2014 Thanks IIYAMA ! i understood it Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now