for i = startRange+(2*numEntriesPerItem) to 200 step 2*numEntriesPerItem
{
i=Integer(i);
if(((Integer(Item_Array[i+5]) = Integer(currMenuSubCategory)) or (Integer(Item_Array[i+5+numEntriesPerItem]) = Integer(currMenuSubCategory)) or (Integer(currMenuSubCategory)=0)) and ((Item_Array[i+1] > 0) or (Item_Array[i+numEntriesPerItem+1] > 0)))
{
setRange=i;
//debug(setRange);
//i=Integer((Item_Array.numChildren+1)-numEntriesPerItem)+1;
debug(i);
}
i=i+476;
}
Theoretically this loop should only run once and then exit since the line i=i+476 is there. However, it runs all the way up to 200 in increments of the step value without exiting until the end. It seems that maybe the i=i+476 line is being ignored, but more likely, I'm doing something stupid like missing a parentheses somewhere Help if you can!
Apparently break statements aren't in until next version. But I would think if I set i to some huge number it should meet the condition to break the loop. Oh well I just converted the logic to a while loop and it works like a charm