2 warnings - 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: 2 warnings (
/showthread.php?tid=306561)
2 warnings -
Alexander_123 - 27.12.2011
Hello!
When i compile i got 2 warning
pawn Код:
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(13071) : warning 219: local variable "Pos" shadows a variable at a preceding level
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(26293) : warning 203: symbol is never used: "highlight"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
How to fix it?
Re: 2 warnings -
Georgi166 - 27.12.2011
Well if your too tired or bored to fix it bla bla bla I Don't know how to fix it, But i got 2 warnings too..Script still work.The problem are the errors if you get some.
Re: 2 warnings -
Alexander_123 - 27.12.2011
Quote:
Originally Posted by Georgi166
Well if your too tired or bored to fix it bla bla bla I Don't know how to fix it, But i got 2 warnings too..Script still work.The problem are the errors if you get some.
|
if you cant tell how to fix then why are you replying :S
Re: 2 warnings -
SomebodyAndMe - 27.12.2011
'Show us the line 13071 and 26293
Re: 2 warnings -
Alexander_123 - 27.12.2011
line 13071
Re: 2 warnings -
Ouch_Charlie - 27.12.2011
Quote:
Originally Posted by Alexander_123
|
Remove that line, because
new Float: Pos[3];
is already defined somewhere.
And the second warning?
Re: 2 warnings -
[ABK]Antonio - 27.12.2011
The second is simply because you haven't used the highlight variable - Use it or remove it to fix it
Re: 2 warnings -
Ouch_Charlie - 27.12.2011
Quote:
Originally Posted by [ABK]Antonio
The second is simply because you haven't used the highlight variable - Use it or remove it to fix it
|
Yeah. Just Search the variable 'new highlight' or 'define highlight' and remove it, or remove it like [ABK]Antonio said.
Re: 2 warnings -
Alexander_123 - 27.12.2011
But 'new highlight' or 'define highlight' are not there in the script.
Re: 2 warnings -
Steven82 - 27.12.2011
Quote:
Originally Posted by Ouch_Charlie
Remove that line, because new Float: Pos[3];
is already defined somewhere.
|
No that's not correct.
You fix this error by increasing the value [3]. Because if you shadow it, your using to much of it. Keep in mind that when using variables like this, you start with Pos[0], Pos[1], Pos[2] (that would be why you put Pos[3]).
Unless i'm thinking of something else..lol.