thepizz
|
  |
| Joined: 05 Mar 2011 |
| Total Posts: 2612 |
|
| |
|
GGGGG14
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25344 |
|
|
| 21 Nov 2013 08:30 PM |
for _,x in pairs for i,x in pairs |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Nov 2013 08:30 PM |
ipairs only goes over numeric indexes
Don't use ipairs if you are planning to, use pairs, next, or the more efficient: numeric for's
ipairs sucks |
|
|
| Report Abuse |
|
|
thepizz
|
  |
| Joined: 05 Mar 2011 |
| Total Posts: 2612 |
|
|
| 21 Nov 2013 08:34 PM |
| So ipairs is almost useless..? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 21 Nov 2013 08:36 PM |
| Ipairs is only useful when you need to loop through a table in order. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Nov 2013 08:38 PM |
| But a numeric for does that, and more than 2x faster |
|
|
| Report Abuse |
|
|
thepizz
|
  |
| Joined: 05 Mar 2011 |
| Total Posts: 2612 |
|
| |
|