Using continue in two loops at the same time
#1

pawn Code:
for(new v = 0; v < MAX_VEHICLES; v ++)
        {
            for(new i = 0; i < MAX_PLAYERS; i ++)
            {
                if(GetPlayerVehicleID(i) == v) continue;
            }
        }
As you see I am using two loops here at the same time (don't say DON'T). Now if I use "continue" will it skip the current 'i' or will it skip the current 'v'?

I know I should use a stock for this, but just wondering - I try to evade using stocks if I just use this for one command.

Jochem
Reply
#2

It'll skip the current loop.
Reply
#3

Depend on where you put the continue.
If you put it inside i loop, then the current i will skipped.
Reply
#4

All right, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)