Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
Re: bgt, array for loop skips indexes Nope, it deffinitely has to do something with your code. For loops are the pitfalls most of the time here, because the indexing counts on even though you're removing entries from the array and thus need to stay at the same index for at least one

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: bgt, array for loop skips indexes Are you removing the filenames from the array?When removing items from arrays, you must decrement the index, otherwise it will skip the next item.For instance, we have the following:int[] numbers = {0, 1, 2, 3, 4}for (int i=0; i if (numbers[i] > 1

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: bgt, array for loop skips indexes @3 that totally makes sense. Thank you for the explanation. Also, I am not deleting the actual files, just the file names as the array entries. I didn't think about the capital rule though, thanks for making me aware of that. URL:

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: bgt, array for loop skips indexes hi,@3 is correct. I will just add, that you might also like to usecontinue;After decreasing your loop variable, in this case i. It's because after removing the item and dealing with the index, it makes no longer sense to run the loop's itera

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: bgt, array for loop skips indexes Hi,@3 is correct. I will just add, that you might also like to usecontinue;After decreasing your loop variable, in this case i. It's because after removing the item and dealing with the index, it makes no longer sense to run the loop's itera

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
Re: bgt, array for loop skips indexes Yeah, this is generally when you'd use continue. In the example above, there was nothing else in the loop, so it would have been pointless, but it is good practice in general. URL: https://forum.audiogames.net/post/493875/#p493875 -- Audio

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: bgt, array for loop skips indexes Ok, thanks for the info. URL: https://forum.audiogames.net/post/493878/#p493878 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: bgt, array for loop skips indexes

2020-01-18 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
Re: bgt, array for loop skips indexes If you start at the end of the array it is way easier. There is no need to decrement any counter indexes after removing an item. Apart from having to shuttle down the items you've already searched over (some languages will do this for you), it i