generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: ipairs and pairs

Previous Thread :: Next Thread 
thepizz is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
21 Nov 2013 08:28 PM
Difference?
Report Abuse
GGGGG14 is not online. 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 is not online. 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 is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
21 Nov 2013 08:34 PM
So ipairs is almost useless..?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Nov 2013 08:35 PM
Yes
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
21 Nov 2013 08:36 PM
Ipairs is only useful when you need to loop through a table in order.
Report Abuse
cntkillme is not online. 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 is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
21 Nov 2013 08:38 PM
Ah okay, thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image