#1

I get this warning maybe you guys can help me

Код:
warning 219: local variable "PBVehicles" shadows a variable at a preceding level
pawn Код:
for(new PBVehicles = 0; PBVehicles < MAX_VEHICLES; PBVehicles++)
    {
        SetVehicleNumberPlate(PBVehicles, "Pizza");
    }
Reply
#2

You are using PBVehicles somewhere already, try changing it to this:

PHP код:
for(new PlateVehicles0PlateVehicles MAX_VEHICLESPlateVehicles++)
    {
        
SetVehicleNumberPlate(PlateVehicles"Pizza");
    } 
Reply
#3

Quote:
Originally Posted by aoky
Посмотреть сообщение
You are using PBVehicles somewhere already, try changing it to this:

PHP код:
for(new PlateVehicles0PlateVehicles MAX_VEHICLESPlateVehicles++)
    {
        
SetVehicleNumberPlate(PlateVehicles"Pizza");
    } 
Then the plate wont appear on my pizzabikes.
Reply
#4

What does the name of a temporary variable have to do with anything? If "PBVehicles" is an array then you should iterate over it like this:

PHP код:
for(new isizeof(PBVehicles); i++) 
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
What does the name of a temporary variable have to do with anything? If "PBVehicles" is an array then you should iterate over it like this:

PHP код:
for(new isizeof(PBVehicles); i++) 
Thanks mate this works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)