SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/05/2014, 01:39 PM   #1
hillko
Gangsta
 
Join Date: Dec 2010
Location: Томская область г.Северск
Posts: 531
Reputation: 4
Default warn

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 (c) 1997-2006, ITB CompuPhase


8 Warnings.
hillko is offline   Reply With Quote
Old 10/05/2014, 01:42 PM   #2
Need4samp
Big Clucker
 
Need4samp's Avatar
 
Join Date: Feb 2014
Location: Morocco.pwn
Posts: 93
Reputation: 40
Default Re: warn

Click on " Ctrl+f " and search for " model " , and tell me ... how much you have of "model"
__________________
Visit our page !!
My Channel

NOTE: don't give me REP for nothing



Need4samp is offline   Reply With Quote
Old 10/05/2014, 01:51 PM   #3
hillko
Gangsta
 
Join Date: Dec 2010
Location: Томская область г.Северск
Posts: 531
Reputation: 4
Default Re: warn

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);
hillko is offline   Reply With Quote
Old 10/05/2014, 02:08 PM   #4
NaClchemistryK
Huge Clucker
 
NaClchemistryK's Avatar
 
Join Date: Jun 2013
Posts: 259
Reputation: 6
Default Re: warn

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.
NaClchemistryK is offline   Reply With Quote
Old 10/05/2014, 02:28 PM   #5
hillko
Gangsta
 
Join Date: Dec 2010
Location: Томская область г.Северск
Posts: 531
Reputation: 4
Default Re: warn

that is what I need to do?
hillko is offline   Reply With Quote
Old 10/05/2014, 02:30 PM   #6
Deal-or-die
Huge Clucker
 
Deal-or-die's Avatar
 
Join Date: Oct 2010
Location: An Island 1000's of miles away
Posts: 366
Reputation: 22
Default Re: warn

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.
__________________
/////////////////////////// | Mini Moot | \\\\\\\\\\\\\\\\\\\\\\\\\\\

"I'm in the country that basically invented the Internet, and your getting faster speeds on an island 1,000miles away"
Deal-or-die is offline   Reply With Quote
Old 10/05/2014, 02:34 PM   #7
NaClchemistryK
Huge Clucker
 
NaClchemistryK's Avatar
 
Join Date: Jun 2013
Posts: 259
Reputation: 6
Default Re: warn

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.
NaClchemistryK is offline   Reply With Quote
Old 10/05/2014, 03:34 PM   #8
hillko
Gangsta
 
Join Date: Dec 2010
Location: Томская область г.Северск
Posts: 531
Reputation: 4
Default Re: warn

and what me a line, delete it or change it?
hillko is offline   Reply With Quote
Old 10/05/2014, 03:44 PM   #9
hillko
Gangsta
 
Join Date: Dec 2010
Location: Томская область г.Северск
Posts: 531
Reputation: 4
Default Re: warn

senks! delete
hillko is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/warn NathNathii Scripting Help 1 07/04/2013 12:46 PM
/warn DerickClark Scripting Help 5 25/01/2013 10:19 PM
VIP Warn [REP +1] Thresholdold Scripting Help 11 07/12/2011 02:13 AM
Need Help on /warn GAMER_PS2 Scripting Help 12 26/10/2011 01:02 PM
/warn help Luis- Scripting Help 2 26/09/2011 04:36 PM


All times are GMT. The time now is 05:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.