2 Unknown Errors!!
#1

My friend taught me how to make a /kick command ((I suck at scripting)). We usually use ZCMD but it wasn't working so we used to default strcmp.. For some reason I get 2 errors.

Code:
Quote:

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;
}

Compiler:
Quote:

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.

Reply


Messages In This Thread
2 Unknown Errors!! - by Mappers4Life - 10.08.2013, 23:54
Re : 2 Unknown Errors!! - by Naruto_Emilio - 10.08.2013, 23:59
Re: 2 Unknown Errors!! - by Mappers4Life - 11.08.2013, 00:51
Re: 2 Unknown Errors!! - by Dana_scully - 11.08.2013, 00:53
Re: 2 Unknown Errors!! - by Mappers4Life - 11.08.2013, 00:59
Re: 2 Unknown Errors!! - by Dana_scully - 11.08.2013, 01:13
Re: 2 Unknown Errors!! - by Mappers4Life - 11.08.2013, 01:23

Forum Jump:


Users browsing this thread: 2 Guest(s)