Makeadmin help
#8

^
Код:
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(251) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(251) : warning 215: expression has no effect
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(251) : error 001: expected token: ";", but found "]"
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(251) : error 029: invalid expression, assumed zero
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(251) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
what is the problem?

*btw admin go from 1-4 and then 1337-1338

Код:
CMD:makeadmin(playerid, params[])
{
    if (!PlayerInfo[playerid][pAdmin] && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{09F7DF}DENIED: {ffffff}No access");

    new para1, level;
    if (sscanf(params, "ri", para1, level)) return SendClientMessage(playerid, -1, "{00E6FF}UTILIZARE:{FFFFFF} /makeadmin [IDJucator/ParteDinNume] [level(1-1338)]");
    if (para1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player");
    if (!(1 <= level <= 1338)) return SendClientMessage(playerid, -1, "Invalid level. It must be between 1 and 1338");

    new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[144];

    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));

    PlayerInfo[para1][pAdmin] = level;

    printf("AdmWarning: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
    format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, 128, "{D11515}[AdmWarning]: {FF9203}%s {FFFFFF}has set {FF9203}%s {FFFFFF}to a level {FF9203}%d {FFFFFF}admin.", sendername, giveplayer, level);
    ABroadCast(COLOR_YELLOW, string, 5);
    return 1;
}
Reply


Messages In This Thread
Makeadmin help - by JXF - 22.05.2016, 12:51
Re: Makeadmin help - by MBilal - 22.05.2016, 12:56
Re: Makeadmin help - by iKevin - 22.05.2016, 12:58
Re: Makeadmin help - by JXF - 22.05.2016, 13:43
Re: Makeadmin help - by MBilal - 22.05.2016, 13:59
Re: Makeadmin help - by J0sh... - 22.05.2016, 14:18
Re: Makeadmin help - by Konstantinos - 22.05.2016, 14:18
Re: Makeadmin help - by JXF - 22.05.2016, 14:32
Re: Makeadmin help - by CSLangdale - 22.05.2016, 16:28
Re: Makeadmin help - by Konstantinos - 22.05.2016, 17:19

Forum Jump:


Users browsing this thread: 2 Guest(s)