code stops and does not continue
#1

I have to big chunk of code and it seems to stop right here it hits the first 3 dots but not the last 3 I do have a lot of code before this function is called. Does code eventual stop if there is to much? Can can anyone fix this You can see the rest of the code in that section if you ask but I not sure if your going to make sense of it and there is a lot.
pawn Код:
stock Float:DivideFuel(refineryid, Float:fuelammount)
{
    new oilstoragecount;
    print("...");//remove
    for(new count2 = 0;count2 < MAX_OILSTORAGE;count2++)
    {
        if((oilstoragestate[count2][refineryid])==1)
        {
            oilstoragecount++;
        }
    }
    print("...");//remove
    return fuelammount / oilstoragecount;
}//mark
Reply
#2

looks like it might be accessing an index out of bounds in the array, which would make it stop
Reply
#3

Thanks I used the wrong constant in the loop
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)