Help here a bit?
#1

../gamemodes/OnPlayerCommandZCMD.pwn(2842) : error 010: invalid function or declaration




pawn Код:
}
COMMAND:leadercmds(playerid, params[])
{
        if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
        {
            new string[128];
            format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
            ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
        }
    }
    line 2842 return 1;
Reply
#2

pawn Код:
COMMAND:leadercmds(playerid, params[])
{
        if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
        {
            new string[128];
            format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
            ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
        }
    }
    return 1;
}
You missed the ending bracket
Reply
#3

return 1; is outside of command, leadercmds never returns anything?
Reply
#4

pawn Код:
COMMAND:leadercmds(playerid, params[])
{
    if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
    {
        new string[128];
        format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
        ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
    }
    return 1;
}
EDIT:

1 minute late
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)