When you end a loop, the code after won't load
#1

Hello,

I am creating a code to spawn a vehicle if you logon.
But there's a problem which I never had before with the same script.

If I use this loop, the code after this loop won't do anything anymore.

This is the code I am using to load the vehicle:

pawn Код:
for(new i; i < MAX_VEHICLES + 1; i++)
        {
        if(strmatch(Owner, Name))
        {
            COwnerData[i][CarID] = CreateVehicle(COwnerData[i][ModelID], COwnerData[i][carX], COwnerData[i][carY], COwnerData[i][carZ], COwnerData[i][carRot], COwnerData[i][pC1], COwnerData[i][sC2], 30*10000);
            continue;
        }
        }
The continue; was my second option, which didn't work.

I also removed a brace, it worked. But then the vehicle will not spawn.
Reply


Messages In This Thread
When you end a loop, the code after won't load - by Biesmen - 22.01.2011, 17:30
Re: When you end a loop, the code after won't load - by wups - 22.01.2011, 17:34
Re: When you end a loop, the code after won't load - by _Tommy - 22.01.2011, 17:38
Re: When you end a loop, the code after won't load - by Biesmen - 22.01.2011, 17:40
Re: When you end a loop, the code after won't load - by wups - 22.01.2011, 17:53
Re: When you end a loop, the code after won't load - by Biesmen - 22.01.2011, 17:55

Forum Jump:


Users browsing this thread: 3 Guest(s)