warning 219: local variable "string" shadows a variable at a preceding level
#3

pawn Код:
CMD:dinvite(playerid, params[])
{
    new targetid, string[128];
    if(PlayerInfo[playerid][pDivLeader] == 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not authorized to use this command!");
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /dinvite [PlayerID]");
    if(playerid == targetid) return SendClientMessage(playerid, COLOR_WHITE, "ERROR: You can't invite yourself.");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "ERROR: This player is not in the server");
    if(PlayerInfo[targetid][pMember] != PlayerInfo[playerid][pMember]) return SendClientMessage(playerid, COLOR_WHITE,"ERROR: This player is not in your faction");
    if(PlayerInfo[targetid][pDiv] > 0) return SendClientMessage(playerid, COLOR_WHITE, "ERROR: That player is already in a division!");
    Division[targetid] = PlayerInfo[playerid][pDiv]
    DInvited[targetid] = 1;
    DInviter[targetid] = playerid;
    format(string, sizeof(string), " You have invited %s to join the %s division.", RPName(targetid), FDiv(playerid));
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), " %s has invited you to join the %s division. (/accept divsion)", RPName(targetid), FDiv(playerid));
    SendClientMessage(targetid, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)