SA-MP Forums Archive
warning - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: warning (/showthread.php?tid=272497)



warning - hillko - 28.07.2011

pawn Code:
Код HTML:
E:\GTA\samp03csvr_R2-2_win32\gamemodes\LVDM-Four.pwn(1025) : warning 219: local variable "Name" shadows a variable at a preceding level
E:\GTA\samp03csvr_R2-2_win32\gamemodes\LVDM-Four.pwn(1051) : warning 219: local variable "Name" shadows a variable at a preceding level
E:\GTA\samp03csvr_R2-2_win32\gamemodes\LVDM-Four.pwn(3038) : warning 219: local variable "Name" shadows a variable at a preceding level
E:\GTA\samp03csvr_R2-2_win32\gamemodes\LVDM-Four.pwn(3064) : warning 219: local variable "Name" shadows a variable at a preceding level
E:\GTA\samp03csvr_R2-2_win32\gamemodes\LVDM-Four.pwn(3119) : warning 219: local variable "Name" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
Thanks all


Re: warning - Mean - 28.07.2011

Rename these "Name" variables to something like "pName", or "abcdName".
The script is warning you that you already have "Name" declared, for example:
pawn Код:
new
    name[ 24 ]
    ,name[ 24 ]
;
will give you a warning, so you need to do:
pawn Код:
new
    name[ 24 ]
    ,name2[ 24 ]
;
Get it?


Re: warning - hillko - 28.07.2011

thanks fixed


Re: warning - Mean - 28.07.2011

pawn Код:
new file[100],pName2[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName2,sizeof(pName2));
format(file,sizeof(file),PlayerFile,pName2);
EDIT: Oh you edited your post .


Re: warning - hillko - 28.07.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
pawn Код:
new file[100],pName2[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName2,sizeof(pName2));
format(file,sizeof(file),PlayerFile,pName2);
EDIT: Oh you edited your post .
senks