Thread: Array help
View Single Post
  #12  
Old 08-30-2011, 12:05 AM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
Quote:
Originally Posted by gaben View Post
I don't even know why you're looping it strangely in the first place, but you wrote temp.i < thiso.rights.size() instead of temp.i <= thiso.rights.size()? You'd be excluding one less array item.
No, although his script doesn't require a loop, he is looping it correctly. In arrays, the first element's index is 0, and the last element's index is array.size() - 1.
Reply With Quote