Posted 09 March 2013 - 11:59 PM
Hi,
I was messing around with this loop, for k, v in pairs ( yourTable ) do, and I was wonder what the other loop does.
The other loop is
for i, v in iparis ( yourTabe ) do
I know this:
But f I use .. in ipars( tTable ) do .. I get the same thing.
What is the difference between those?
Engineer
I was messing around with this loop, for k, v in pairs ( yourTable ) do, and I was wonder what the other loop does.
The other loop is
for i, v in iparis ( yourTabe ) do
I know this:
local tTable = {6,5,4,3,2,1}
for k, v in pairs( tTable ) do
print(k.. "\t" ..v)
end
--outputs:
1 6
2 5
3 4
4 3
5 2
6 1
But f I use .. in ipars( tTable ) do .. I get the same thing.
What is the difference between those?
Engineer