29.07.2009, 03:09
Hi, I recently made this code for a more roleplay experience, but I get 2 god damn warnings!
WARNINGS:
Some help would be greatly appreciated
Код:
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; } }
Код:
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