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

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;
}
dcmd_kick(playerid, params[])
{
if(pInfo[playerid][level] < 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You aren't a Perfect Member / level 1+ admin");
new kickid;
new kickname[21];
new adminname[21];
new reason[128];
if(sscanf(params, "uz", kickid, reason)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /kick [playerid/name] [reason]");
new string[128];
GetPlayerName(kickid,kickname,sizeof(kickname));
GetPlayerName(playerid,adminname,sizeof(adminname));
if(!IsPlayerConnected(kickid) || kickid == INVALID_PLAYER_ID || (pInfo[kickid][level] == 5))
{
return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is not connected or is the highest admin level");
}
format(string,256,"KICK: %s has been kicked by %s [reason: %s] ",kickname,adminname,reason);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
|
Originally Posted by big comfy couch
Код:
dcmd_kick(playerid, params[])
{
if(pInfo[playerid][level] < 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You aren't a Perfect Member / level 1+ admin");
new kickid;
new kickname[21];
new adminname[21];
new reason[128];
if(sscanf(params, "uz", kickid, reason)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /kick [playerid/name] [reason]");
new string[128];
GetPlayerName(kickid,kickname,sizeof(kickname));
GetPlayerName(playerid,adminname,sizeof(adminname));
if(!IsPlayerConnected(kickid) || kickid == INVALID_PLAYER_ID || (pInfo[kickid][level] == 5))
{
return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is not connected or is the highest admin level");
}
format(string,256,"KICK: %s has been kicked by %s [reason: %s] ",kickname,adminname,reason);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
|
C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(410) : warning 219: local variable "name" shadows a variable at a preceding level C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(414) : error 035: argument type mismatch (argument 2) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(414) : error 035: argument type mismatch (argument 2) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(415) : error 035: argument type mismatch (argument 1) C:\Users\Alex\Desktop\Mini-Wars\filterscripts\System.pwn(410) : warning 204: symbol is assigned a value that is never used: "name" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
|
Originally Posted by lrZ^ aka LarzI
This is the correct lines?
Cause if I'm not wrong, I can't see any lines containing the variable 'name' which gives errors. |
|
Originally Posted by lrZ^ aka LarzI
search through your script (ctrl+f) and replace every line containing the variable 'name' (even the defininition 'new name...' with name2 or something like that, so it doesn't interfere with the sscanf code.
|
Thank you so much ^^