Plate - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Plate (
/showthread.php?tid=640206)
Plate -
Hellman92 - 29.08.2017
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");
}
Re: Plate -
aoky - 29.08.2017
You are using PBVehicles somewhere already, try changing it to this:
PHP код:
for(new PlateVehicles= 0; PlateVehicles < MAX_VEHICLES; PlateVehicles++)
{
SetVehicleNumberPlate(PlateVehicles, "Pizza");
}
Re: Plate -
Hellman92 - 29.08.2017
Quote:
Originally Posted by aoky
You are using PBVehicles somewhere already, try changing it to this:
PHP код:
for(new PlateVehicles= 0; PlateVehicles < MAX_VEHICLES; PlateVehicles++)
{
SetVehicleNumberPlate(PlateVehicles, "Pizza");
}
|
Then the plate wont appear on my pizzabikes.
Re: Plate -
Vince - 29.08.2017
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 i; i < sizeof(PBVehicles); i++)
Re: Plate -
Hellman92 - 30.08.2017
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 i; i < sizeof(PBVehicles); i++)
|
Thanks mate this works