Raised This Month: $ Target: $400
 0% 

Arrays


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-21-2013 , 05:30   Re: Arrays
Reply With Quote #9

The problem is you delete one cell without recounting or subtract the number of removed indexes.
The code works great except for 2 things.
* If you delete one item, the one after will be ignored because it was shifted to the position of the first one.
* When the loop reaches the end, it doesn't know that the size has changed. This is the reason it throws an error, you're trying to retrieve values outside of the array range.

Look at the example I gave. Especially the variable deleted_items.
__________________

Last edited by Black Rose; 09-21-2013 at 05:30.
Black Rose is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode