|
I came across something that saids "for i,v in next, t do"
What does in next mean? |
|
|
it's a generic for loop: iterates through all objects in table 't' using 'next' as its iterator function |
|
|
its pretty much like using pairs |
|
Drac0n1sJoin Date: 2016-01-27 Post Count: 42 |
Im not certain but basically it's like _,V |
|
|
so should I use in pair Instead? |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Use either, no real difference (pairs returns next so in the end, they both use next) |
|
|
for _,obj in pairs(t) do is pretty much the same as for _,obj in next, t do
|
|
|
|
cnt is an idiot, in next is theoretically 1 / 160000 more effecient |
|