Advertisement
Derek1017

Tables

Jul 10th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local myTable = {}
  2. -- This...
  3. myTable[1] = "This is item 1 of the table"
  4. -- ... does the same as this
  5. myTable:insert(1, "This is item 1 of the table")
  6. print(myTable[1]) -- Prints out "This is item 1 of the table"
  7. myTable["ZudoHackz"] = "MyPassword"
  8. myTable["SomeoneElse"] = "SomePassword"
  9. print(myTable["ZudoHackz"])
  10. -- Or
  11. print(myTable.ZudoHackz)
  12. local myTable = {}
  13. myTable[1] = "blah1"
  14. myTable[2] = "blah2"
  15. myTable[3] = "blah3"
  16. ...
  17. local myTable = {"blah1","blah2","blah3"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement