Why does this ...
#1

Hello every one
why does this does't work ?
Код:
#include <sscanf2>
dcmd(kick, 4 , cmdtext);
dcmd_kick(playerid, params[])
{
    
	new name1[MAX_PLAYER_NAME];
	new name2[MAX_PLAYER_NAME];
	new String[286];
	new reason[80];
	new id[80];
	if(AccountInfo[playerid][AdminLevel] <= 1)
	{
	if (sscanf(params, "us[80]", id,reason)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /kick [playerid] [reason]"); //If you didn't fill in the command correctly.
line 1624	if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_WHITE,"This player is not connected."); // Obvious why.
	GetPlayerName(playerid, name1, sizeof(name1)); // Getting the name of the playerid
line 1626	GetPlayerName(id, name2, sizeof(name2)); // Getting the name of the target.
	format(String,sizeof(String),"%s has been kicked by admin %s Reason: %s",name2,name1,reason); //We're defining the message here. with it's information
	SendClientMessageToAll(COLOR_WHITE,String); // Sends the message to everyone.
line 1629	Kick(id); //Will kick the player. Make sure it is id and not playerid because playerid will kick yourself.
	return 1; // Stops the command.

	}
	return 1;
}
Whats Wrong in it
?
Errors Show
Код:
C:\Users\almooo\Desktop\Zombie server\gamemodes\Zm.pwn(1624) : error 035: argument type mismatch(argument 1)
C:\Users\almooo\Desktop\Zombie server\gamemodes\Zm.pwn(1626) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombie server\gamemodes\Zm.pwn(1629) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply


Messages In This Thread
Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:07
Re: Why does this ... - by Finn - 29.04.2012, 12:08
Re: Why does this ... - by Ash. - 29.04.2012, 12:10
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:10
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:34
Re: Why does this ... - by Ash. - 29.04.2012, 13:30
Re: Why does this ... - by iRemix - 29.04.2012, 16:24
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 17:07
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 17:12
Re: Why does this ... - by Crazymax - 29.04.2012, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)