I am trying this code:
entLoop:for(var i:*in entities) {
for(var i2:*in ignoreEntities) {
if(entities[i].type==ignoreEntities[i2]) {
continue entLoop;
}
}
}
Why is it not working? The error is:
Target of continue statement was not found.
I may be wrong, but it seems that the continue instruction doesn't work with for...in loops.
Compiler doesn't throw any error with this code :
entLoop:for(var i:Number = 0 ; i < 2 ; i++) {
for(var i2:Number = 0 ; i2 < 2 ; i2++) {
if(true) {
continue entLoop;
}
}
}
(I replaced your condition by true since I don't have the definitions for your entities and ignoreEntities arrays)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With