29.04.2012, 12:07
Hello every one
why does this does't work ?
Whats Wrong in it
?
Errors Show
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; }
?
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.