public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/kick", cmdtext, true, 10) == 0) { new string[180], reason[80], giveplayerid; if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "COMMAND /simplekick [id] [why]"); if(!IsPlayerAdmin(playerid)) { SendClientMessage(playerid, COLOR_WHITE, "You Are not an Admin!"); } else { format(string, sizeof(string), "%s has been kicked by %s - Reason: %s", GetPlayerName(giveplayerid), GetPlayerName(playerid), reason); SendClientMessageToAll(COLOR_WHITE, string); Kick(giveplayerid); } return 1; } return 0; } |
C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(94) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(94) : warning 219: local variable "giveplayerid" shadows a variable at a preceding level C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(95) : error 017: undefined symbol "params" C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(245) : warning 203: symbol is never used: "giveplayerid" C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(245) : warning 203: symbol is never used: "string" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kick", cmd, true) == 0)
{
new string[180], reason[64], plid;
if(sscanf(cmdtext, "s[6]us[64]", cmd, plid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "COMMAND /simplekick [id] [why]");
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "You Are not an Admin!");
}
else
{
format(string, sizeof(string), "%s has been kicked by %s - Reason: %s", GetPlayerName(plid), GetPlayerName(playerid), reason);
SendClientMessageToAll(COLOR_WHITE, string);
Kick(plid);
}
return 1;
}
return 0;
}
C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(92) : error 017: undefined symbol "cmd" C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(94) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(95) : error 017: undefined symbol "cmd" C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(102) : warning 202: number of arguments does not match definition C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(245) : warning 203: symbol is never used: "giveplayerid" C:\Users\jack\Desktop\LARP\gamemodes\kicktesting.p wn(245) : warning 203: symbol is never used: "string" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kick", cmdtext, true, 10) == 0)
{
new string[180], reason[80], giveplayerid;
if(sscanf(cmdtext, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "COMMAND /simplekick [id] [why]");
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "You Are not an Admin!");
}
else
{
format(string, sizeof(string), "%s has been kicked by %s - Reason: %s", GetPlayerName(giveplayerid), GetPlayerName(playerid), reason);
SendClientMessageToAll(COLOR_WHITE, string);
Kick(giveplayerid);
}
return 1;
}
return 0;
}