SA-MP Forums Archive
local variable warning - 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: local variable warning (/showthread.php?tid=505854)



local variable warning - WorldPro - 10.04.2014

Hello !

i have a 2 warnings.

Warnings:
PHP код:
Line 1009warning 219local variable "veh1" shadows a variable at a preceding level
Line 1032
warning 219local variable "veh2" shadows a variable at a preceding level 
Lines:
PHP код:
Line 1009: new veh1 CreateVehicle(411x+3,y,za, -1, -1, -1);
Line 1032: new veh2 CreateVehicle(562x+3,y,za, -1, -1, -1); 
Up In Mode:
PHP код:
new veh1;
new 
veh2

how to fix this ?

thanks!



Re: local variable warning - Dignity - 10.04.2014

pawn Код:
new veh1 = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
new veh2 = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
to

pawn Код:
veh1 = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
veh2 = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);



Re: local variable warning - WorldPro - 10.04.2014

Quote:
Originally Posted by Mionee
Посмотреть сообщение
pawn Код:
new veh1 = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
new veh2 = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
to

pawn Код:
veh1 = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
veh2 = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
thanks , its works !