SA-MP Forums Archive
warn - 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: warn (/showthread.php?tid=512364)



warn - hillko - 10.05.2014

HTML Code:
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(7692) : warning 219: local variable "model" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(7992) : warning 219: local variable "cartype" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8006) : warning 219: local variable "cartype" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8007) : warning 219: local variable "State" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8038) : warning 219: local variable "cartype" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8039) : warning 219: local variable "State" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8063) : warning 219: local variable "cartype" shadows a variable at a preceding level
C:\Users\User\Desktop\ULTIMITED_v_2_5\ULTIMITED_v_2_5.pwn(8064) : warning 219: local variable "State" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Warnings.



Re: warn - Need4samp - 10.05.2014

Click on " Ctrl+f " and search for " model " , and tell me ... how much you have of "model"


Re: warn - hillko - 10.05.2014

Quote:
Originally Posted by Need4samp
View Post
Click on " Ctrl+f " and search for " model " , and tell me ... how much you have of "model"
HTML Code:
     7692         new model = GetVehicleModel(GetPlayerVehicleID(playerid));
     7992         new cartype = GetPlayerVehicleID(playerid);
     8006         new cartype = GetPlayerVehicleID(playerid);
     8007         new State=GetPlayerState(playerid);
     8038         new cartype = GetPlayerVehicleID(playerid);
     8039         new State=GetPlayerState(playerid);
     8063	     new cartype = GetPlayerVehicleID(playerid);
     8064         new State=GetPlayerState(playerid);



Re: warn - NaClchemistryK - 10.05.2014

rename the variables that shadow another one at a preceeding level. It means that one of your variables has a very similar name of another one. Change their name, simple solution. Or if the vars do the same thing, then remove the second one.


Re: warn - hillko - 10.05.2014

that is what I need to do?


Re: warn - Deal-or-die - 10.05.2014

Assuming that you have
pawn Code:
new cartype = GetPlayerVehicleID(playerid);
In callbacks aswell as a global, either remove/rename either one should fix your problem.


Re: warn - NaClchemistryK - 10.05.2014

Yes... look..
pawn Code:
7692         new model = GetVehicleModel(GetPlayerVehicleID(playerid));
     7992         new cartype = GetPlayerVehicleID(playerid);
     8006         new cartype = GetPlayerVehicleID(playerid);// same as id 7992
     8007         new State=GetPlayerState(playerid);
     8038         new cartype = GetPlayerVehicleID(playerid); //this is the same as id 7992
     8039         new State=GetPlayerState(playerid); //this is the same as id 8007
     8063        new cartype = GetPlayerVehicleID(playerid); //same as id 7992
     8064         new State=GetPlayerState(playerid); //same as id 8007
Do what @above said (actually just what I said in my first post here).
Remove the ones in // and your script should be fine
If you really need them all, create an array instead of the same variables.


Re: warn - hillko - 10.05.2014

and what me a line, delete it or change it?


Re: warn - hillko - 10.05.2014

senks! delete