18.11.2009, 21:57
Hi,
When I use sscanf I the following errors...
Please help me with this
Thanks.
EDIT:
Here's my code;
When I use sscanf I the following errors...
Код:
C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(424) : warning 219: local variable "name" shadows a variable at a preceding level C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(428) : error 035: argument type mismatch (argument 2) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(428) : error 035: argument type mismatch (argument 2) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(429) : error 035: argument type mismatch (argument 1) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(424) : warning 204: symbol is assigned a value that is never used: "name" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Thanks.
EDIT:
Here's my code;
Код:
dcmd_kick(playerid, params[]) { if(pInfo[playerid][level] >= 1) { if(!strlen(params)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /kick [playerid/name] [reason]"); return 1; } new kickid; new reason[128]; new string[128]; new kickname[48]; new adminname[48]; sscanf(params, "uz", kickid, reason); GetPlayerName(kickid,kickname,sizeof(kickname)); GetPlayerName(playerid,adminname,sizeof(adminname)); if(!IsPlayerConnected(kickid) || kickid == INVALID_PLAYER_ID || (pInfo[kickid][level] == 5)) { SendClientMessage(playerid,COLOR_RED,"ERROR: Player is not connected or is the highest admin level"); return 1; } format(string,256,"KICK: %s has been kicked by %s [reason: %s] ",kickname,adminname,reason); SendClientMessageToAll(COLOR_WHITE,string); } else { SendClientMessage(playerid,COLOR_RED,"ERROR: You aren't a Perfect Member / level 1+ admin"); } return 1; }