WoW:API pairs: Difference between revisions
Jump to navigation
Jump to search
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( | for index,value in pairs(random_array) do | ||
if (type(index) == "number") then | if (type(index) == "number") then | ||
index = tostring(index) | index = tostring(index) | ||