for loop problem :(
Posted: Wed Jan 16, 2008 7:49 am
So I have the following loop
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!
Code: Select all
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;
}