Can I get help on how I would fix my skin cmd? When your at a certain place and you are aloud that function for instance, I'm a cop I want to be like a UC cop, I have to go to the station to become that but I get a warning in my command. Can someone tell me how to fix this? I already have "cop," at the enum pInfo so I got that defined.
}
else if (strcmp(cmd, "!cop", true) == 0) {
if (PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_GREEN, "Please login first");
else {
new szMsg[256];
SetPlayerSkin(playerid, 1);
SetPlayerWeapon(playerid, 17, 500);
SetPlayerWeapon(playerid, 19, 500);
PlayerInfo[playerid][cop] = 1;
format(szMsg, sizeof(szMsg), "Welcome to the force, officer %s", gPlayers[playerid]);
SendClientMessage(playerid, COLOR_GREEN, szMsg);
SendClientMessage(playerid, COLOR_GREEN, "!cophelp");
SetSpikes(playerid,1);
}
return 1;
And the warning I get says: warning 219: local variable "szMsg" shadows a variable at a preceding level
How would I fix this so I can remove the 5 warnings I have?