Hey !
*bows down before MI_FRED's renowned knowledge as an introduction*
I stumbled on your post this morning, and even though I'm no brainiac, I like to set my neurons working. I hence tried to test your script and here is what I have found :
What struck me at first is that you're counting positive elements of arrays which look like weapons strings. So what I did was replace the "_initairShells", "_initartyShells", "_initmortShells" by random values, for instance :
_initairShells = [0,-1,0]
_initartyShells = [2,28,0]
_initmortShells = [54,-10,0]
I also inserted debugging hints :
while "_as < (count _initassets)" do {if({_x > 0} count (_initassetshells select _as) > 0) then {hint "yeah !"} else {hint "nope"};_as = _as + 1};
And you know what ? It WORKED.
If the arrays contained only negative elements, I obtained "nope", if there was at least one positive element, "yeah !" showed.
I also tried your original script, only using the debugging hints and adding the "else" thing, and I had no error message, and simply kept having "nope".
while "_as < (count _initassets)" do {if({_x > 0} count (_initassetshells select _as) > 0) then {hint "yeah !"} else {hint "nope"};_as = _as + 1;};
So isn't there a simple mistake as to the NATURE of the elements counted (scalar values vs. strings) ? How can non-scalar values be superior or inferior to 0 ?
Anyway, Doc, I hope that all of this makes sense and that, well, it can be of any help.
Ig.