-->How To Fix It?<-- - 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: -->How To Fix It?<-- (
/showthread.php?tid=369677)
-->How To Fix It?<-- -
xSkullx - 17.08.2012
pawn Код:
(4291) : warning 219: local variable "string" shadows a variable at a preceding level
And the line :
pawn Код:
new string[128]; format(string, sizeof(string), "%s has been kicked (Failed Logins)", PlayerName2(playerid) );
Re: -->How To Fix It?<-- -
Kindred - 17.08.2012
This is why:
pawn Код:
new string[128]; //Global variable
//or
new string[128];
new string[256]; //Two of the same in a function
Just change it to string2 or remove the global variable string and create it back where it is needed.
Re: -->How To Fix It?<-- -
xSkullx - 17.08.2012
Thanks dude.
+repped.
Re: -->How To Fix It?<-- -
Julian12345 - 17.08.2012
Good job
Re: -->How To Fix It?<-- -
Jay. - 17.08.2012
Quote:
Originally Posted by Kindred
This is why:
pawn Код:
new string[128]; //Global variable
//or
new string[128]; new string[256]; //Two of the same in a function
Just change it to string2 or remove the global variable string and create it back where it is needed.
|
ey pal i helpet him wwell donee helpet
Re: -->How To Fix It?<-- -
Julian12345 - 17.08.2012
Quote:
Originally Posted by Jay.
ey pal i helpet him wwell donee helpet
|
+1 rep pal
Re: -->How To Fix It?<-- -
Sandiel - 17.08.2012
You got two global and/or local new defined variables/strings that have the same displayed name, therefor they are conflicted.
Change them, and all the things related to em, hope it helps.