Problem - local variable "str" shadows a variable at a preceding level -
prooftzm - 03.07.2014
Hi all. I got a big problem

(
when i compile my Gang War GM, i get 13 warnings.
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _debug.inc(277) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _debug.inc(339) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _debug.inc(344) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _amx.inc(454) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _amx.inc(904) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _amx.inc(926) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _utils.inc(246) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _utils.inc(369) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _utils.inc(396) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _utils.inc(475) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _malloc.inc(48

: warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _malloc.inc(613) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Cristi\Desktop\server\pawno\include\YSI\y _ini.inc(1074) : warning 219: local variable "str" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
13 Warnings.
That's sucks

(
Re: Problem - local variable "str" shadows a variable at a preceding level -
Timeless - 03.07.2014
ctrl + g go to those warning lines and change
PHP код:
new:str[126] variables to new:str1[126] then new:str2[126]
and so on btw don't forget to replace the ones the variable used it for
e.g if u have format str... u gotta change the str there to str1 also
i think the the variable affecting everything is on the line 1074
Re: Problem - local variable "str" shadows a variable at a preceding level -
prooftzm - 03.07.2014
Is not working. Maybe i wrote wrong somewhere.
pls help me.
line 277: PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
line 339: {
line 344 : {
line 454: }
line 904: ain't got dat
line 926: ain't got dat
line 246: format(string, sizeof(string), "%s has spawned!", PlayerName);
line 369: ain't got dat
line 396: ain't got dat
I have only 358 lines....
wtf is wrong with this?
Re: Problem - local variable "str" shadows a variable at a preceding level -
Vince - 03.07.2014
Whatever include(s) you have before YSI is (are) poorly written. Check those includes for a "new str" and replace it with "static str".
Re: Problem - local variable "str" shadows a variable at a preceding level -
Timeless - 03.07.2014
nvm Vince got it
*EDIT* how do you do that vince?
Re: Problem - local variable "str" shadows a variable at a preceding level -
prooftzm - 03.07.2014
Vince my respect man ! It works with static str! THX a lot maaan ! REP