pName Shadows a variable
#1

Hello I'm having some trouble so recently I wanted to make my own anti-cheat on my script which would ban players who would spawn a jetpack and aren't admins and I keep getting this error
Код:
(337) : warning 219: local variable "pName" shadows a variable at a preceding level
this is the command
Код:
CMD:jetpack(playerid, params[])
{
	if(User[playerid][USER_ADMIN] >= 4)
	{
	    new string[90],pName[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, pName, sizeof(pName));
	    format(string, sizeof(string), "%s has spawned jetpack", pName);
	    SendClientMessageToAll(-1, string);
	    SetPlayerSpecialAction(playerid, 2);
	}
	return 1;
}
line 337:
Код:
new string[90],pName[MAX_PLAYER_NAME];
Please help me out
Reply


Messages In This Thread
pName Shadows a variable - by Hybris - 01.03.2014, 22:23
Re: pName Shadows a variable - by ConnorHunter - 01.03.2014, 22:36
Re: pName Shadows a variable - by Kar - 01.03.2014, 22:40
Re: pName Shadows a variable - by Hybris - 02.03.2014, 12:59
Re: pName Shadows a variable - by ConnorHunter - 02.03.2014, 13:11
Re: pName Shadows a variable - by Hybris - 02.03.2014, 14:03
Re: pName Shadows a variable - by BKarner - 02.03.2014, 14:17
Re: pName Shadows a variable - by Kar - 02.03.2014, 14:46
Re: pName Shadows a variable - by Hybris - 03.03.2014, 11:15
Re: pName Shadows a variable - by Hybris - 03.03.2014, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)