27.09.2013, 19:33
So this piece of code can go below all the way to 0. I want it so that if it goes below 0, it starts again from MAX_ARENAS which is set to 100. Now, arena 100 to 30 don't exist, so then the loop should start at 29. BUT, its stuck at 0. Won't start at MAX_ARENAS and skip the ones that don't exist.
pawn Код:
for(new i = PVar[playerid][Test] - 1; i >= -1; i--)
{
if(i == -1) i = MAX_ARENAS; // i should now be 100.
if(gArena[i][aExists] == false) continue; // this should skip from 100 to 30.
PVar[playerid][Test] = i; // this should be 29
break;
}