07.06.2011, 01:22
Quote:
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); } } } |
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);
}
}
}