[2 warnings] /hidenames
#1

Hi, I recently made this code for a more roleplay experience, but I get 2 god damn warnings!

Код:
if(strcmp(cmd, "/hidenames", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] == 6)
{
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "AdmCmd: %s has disabled all player name tags!",playername);
SendClientMessageToAll(COLOR_YELLOW, string);
ShowNameTags( 0 );
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, " You are not authorised to use this command!");
return 1;
}
}
WARNINGS:
Код:
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(9526) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Lachlan\Desktop\Hosting Server\pawno\iGRP.pwn(9527) : warning 219: local variable "playername" shadows a variable at a preceding level
Some help would be greatly appreciated
Reply


Messages In This Thread
[2 warnings] /hidenames - by Antonio [G-RP] - 29.07.2009, 03:09
Re: [2 warnings] /hidenames - by Daren_Jacobson - 29.07.2009, 04:21
Re: [2 warnings] /hidenames - by Antonio [G-RP] - 29.07.2009, 04:25

Forum Jump:


Users browsing this thread: 1 Guest(s)