File or function not found.
#8

Quote:
Originally Posted by [RVRP]Tyler
Посмотреть сообщение
Well, I've completely isolated the issue now.

Because of this command, I am getting the error "error 19 file or function not found" when I try and start the server.

Код:
CMD:kick(playerid, params[])
{
	if(PlayerInfo[playerid][Admin] < 1)
	{
	    SendClientMessage(playerid, COLOR_RED, "You don't have access to that command!");
	}
	else
	{
		new id, reason[128];
		if(sscanf(params, "us", id, reason)) SendClientMessage(playerid, COLOR_GREY, "Syntax: /kick [playerid] [reason]");
		else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "That player is not connected!");
		else
		{
		    Kick(id);
			new message[128];
			format(message, sizeof(message), "Administrator %s has kicked %s. Reason: %s", playerid, id, reason);
			SendClientMessageToAll(COLOR_GOLD, message);
		}
	}
}
I updated all of my includes.. not sure what the problem could be.
Are you using the sscanf plugin? If so, try updating that aswell.

EDIT: Also, with the new sscanf plugin, you're doing it wrong.

pawn Код:
CMD:kick(playerid, params[])
{
    if(PlayerInfo[playerid][Admin] < 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You don't have access to that command!");
    }
    else
    {
        new id, reason[128];
        if(sscanf(params, "us[128]", id, reason)) SendClientMessage(playerid, COLOR_GREY, "Syntax: /kick [playerid] [reason]"); //The line I edited.
        else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "That player is not connected!");
        else
        {
            Kick(id);
            new message[128];
            format(message, sizeof(message), "Administrator %s has kicked %s. Reason: %s", playerid, id, reason);
            SendClientMessageToAll(COLOR_GOLD, message);
        }
    }
}
Reply


Messages In This Thread
File or function not found. - by [RVRP]Tyler - 06.06.2011, 02:31
Re: File or function not found. - by Jack_Leslie - 06.06.2011, 02:32
Re: File or function not found. - by grand.Theft.Otto - 06.06.2011, 02:39
Re: File or function not found. - by Jack_Leslie - 06.06.2011, 02:40
Re: File or function not found. - by grand.Theft.Otto - 06.06.2011, 02:43
Re: File or function not found. - by [RVRP]Tyler - 06.06.2011, 02:48
Re: File or function not found. - by [RVRP]Tyler - 07.06.2011, 01:17
Re: File or function not found. - by Skylar Paul - 07.06.2011, 01:22
Re: File or function not found. - by [RVRP]Tyler - 07.06.2011, 02:09
Re: File or function not found. - by [L3th4l] - 07.06.2011, 02:37

Forum Jump:


Users browsing this thread: 4 Guest(s)