warning 219: local variable "PlayerName" shadows a variable at a preceding level - 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: warning 219: local variable "PlayerName" shadows a variable at a preceding level (
/showthread.php?tid=334076)
warning 219: local variable "PlayerName" shadows a variable at a preceding level -
captainjohn - 13.04.2012
Code:
C:\Users\J\Desktop\Script\gamemodes\Bayside.pwn(8047) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Lines 8042 - 8048.
pawn Code:
dcmd_bigsmoke(playerid,params[])
{
#pragma unused params
PlayerDm[playerid] = 1;
ResetPlayerWeapons(playerid);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
Re: warning 219: local variable "PlayerName" shadows a variable at a preceding level -
Kiets - 13.04.2012
You have already defined somewhere out of this function "PlayerName".
Re: warning 219: local variable "PlayerName" shadows a variable at a preceding level -
Twisted_Insane - 13.04.2012
pawn Code:
new playaname[MAX_PLAYER_NAME];
GetPlayerName(playerid,playaname,sizeof(playaname));