Tables/arrays are really confusing... I wish LUA would just use the normal way of doing it.
Well, I've got this:
Code:
for i,v in pairs(ordersN) do
if (type(i) == "number") then
i = tostring(i)
elseif (type(i) == "boolean") then
if (i) then
i = "true"
else
i = "false"
end
end
DEFAULT_CHAT_FRAME:AddMessage(i.." : "..v)
end
And it gets that array fine. But, how would I get the SAME index variable in another array? Lets say I have ordersP, and I want it to display:
0 : PlayerName : ValueP
How would I do this?
(Plus, is there any way to use arrays as they should be used? As in, being able to simply find their length and use ordersP[50] to access the 50th space?)
Thanks!