Advertisement
Guest User

array

a guest
Mar 31st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local color1 = "blue"
  2. local color2 = "red"
  3. local color3 = "yellow"
  4.  
  5. local colors = {"blue", "red", "yellow", "green"}
  6.  
  7. for i = 1, 4 do
  8.   print(colors[i])
  9. end
  10.  
  11.  
  12. local colorcodes = {white = 1, orange = 2, magenta = 4}
  13.  
  14. print(colorcodes["magenta"])
  15.  
  16. for key,value in pairs(colorcodes) do
  17.   print(key.."="..value)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement