03.12.2012, 09:48
Hello, i just made this command to check if a player (offline) is banned or not. It reads from the player file but there is a problem:
(7453) : error 035: argument type mismatch (argument 2)
Line 7453:
Thanks.
pawn Код:
CMD:isbanned(playerid,params[])
{
if(PlayerInfo[playerid][pLogged] == 0) return SCM(playerid,0x0080C0FF,"Please login before using this command.");
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new name[128];
if(sscanf(params, "s[128]",name)) return SCM(playerid,-1,"{F70505}Usage: {FFFFFF}/isbanned <account name>");
new string[128];
new ss;
new filestring[128];
format(filestring, sizeof(filestring), "Users/%s.ini", name);
if(!fexist(filestring)) return SCM(playerid,red, "Player account not found.");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
ss = INI_Load("Banned", name);
INI_Close(File);
switch(ss)
{
case 0:
{
format(string,sizeof string,"%s's account is banned.");
SCM(playerid,COLOR_YELLOW,string);
}
case 1:
{
format(string,sizeof string,"%s's account is not banned.");
SCM(playerid,COLOR_YELLOW,string);
}
}
}
}
return 1;
}
Line 7453:
pawn Код:
ss = INI_Load("Banned", name);