WoW:API pairs: Difference between revisions

6 bytes added ,  27 September 2007
fixed bug in in the example ("local random_array"..."pairs(fruits)")
(Change category from "LUA Functions" to "Lua functions".)
(fixed bug in in the example ("local random_array"..."pairs(fruits)"))
Line 7: Line 7:
  local random_array = { mug = "coffee", [42] = "universe", true = "false" }
  local random_array = { mug = "coffee", [42] = "universe", true = "false" }


  for index,value in pairs(fruits) do  
  for index,value in pairs(random_array) do  
   if (type(index) == "number") then
   if (type(index) == "number") then
       index = tostring(index)
       index = tostring(index)
Anonymous user