Problem with kick command
#1

pawn Код:
COMMAND:kick(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] < 1) return 0; // or just IsPlayerAdmin
    new user, string[64];
    if(!sscanf(params, "u", user))
    {
        format(string, sizeof(string), "%s has been kicked by an admin.", user);
        printf(string);
        SendClientMessageToAll(ADMIN, string);
        SendClientMessage(user, RED, "You have been kicked by an admin.");
        Kick(user);
    }
    else return SendClientMessage(playerid, RED, "USAGE: /kick id");
    return 1;
}
When I start the server, this error pops up:
[16:12:33] Script[gamemodes/SGM.amx]: Run time error 19: "File or function is not found"

Yes I have all plugins/includes. The problem is probably with the sscanf stuff.
And yes, the problem is with that code. I commented it out and it worked fine.
Reply


Messages In This Thread
Problem with kick command - by spedico - 23.02.2011, 13:12
Re: Problem with kick command - by armyoftwo - 23.02.2011, 13:13
Re: Problem with kick command - by spedico - 23.02.2011, 13:20
Re: Problem with kick command - by Jochemd - 23.02.2011, 13:26
Re: Problem with kick command - by spedico - 23.02.2011, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)