I cant make work this command
#1

Hello,im trying to make an /unban command to unban a player account:

pawn Код:
CMD:unban(playerid,params[])
{
    new name[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] < 5) return 0;
    if(sscanf(params,"s[MAX_PLAYER_NAME]",name)) return SendClientMessage(playerid, -1, "Usage: /unban [player name]");
    if(strlen(name) > 24) return SendClientMessage(playerid, red, "The Player Name Must Be Less Than 60 Characters Long.");
    new string[98];
    format(string,sizeof(string),"/Users/%s.ini",name);
    new IsBanned;
    new INI:File = INI_Open(UserPath(playerid));
    {
        INI_Int("Banned");
    }
    if(IsBanned == 0) return SendClientMessage(playerid, red, "This player account is not banned.");
    if(!fexist(string)) return SendClientMessage(playerid, red, "Player account not found, please note the files are CASE SENSITIVE.");
    INI_WriteInt(File,"Banned",0);
    INI_Close(File);
    format(string,sizeof(string),"Player account %s has been unbanned.",name);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",name(playerid),name);
    return 1;
}
I use pInfo.

The variables are:

pBanned
PlayerInfo[playerid][pBanned]

When i compile with that command,i get this errors:

Quote:

C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3621 ) : error 017: undefined symbol "INI_Int"
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 012: invalid function call, not a valid address
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : warning 215: expression has no effect
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 029: invalid expression, assumed zero
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : fatal error 107: too many error messages on one line

Line 3621:
pawn Код:
INI_Int("Banned");
Line 3629:
pawn Код:
format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",name(playerid),name);
Thank you for the help.
Reply


Messages In This Thread
I cant make work this command - by Face9000 - 13.10.2012, 18:49
Re: I cant make work this command - by TzAkS. - 13.10.2012, 18:51
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:51
Re: I cant make work this command - by XtremeR - 13.10.2012, 18:55
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:57
Re: I cant make work this command - by XtremeR - 13.10.2012, 18:58
Re: I cant make work this command - by Face9000 - 13.10.2012, 18:59
Re: I cant make work this command - by ReneG - 13.10.2012, 20:41
Re: I cant make work this command - by Face9000 - 13.10.2012, 21:47
Re: I cant make work this command - by Face9000 - 21.10.2012, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)