From dini to y_ini help
#6

Well here:
pawn Code:
CMD:unban(playerid, params[]) {
    if (pInfo[playerid][pAdmin] >= 3) {
        if(sscanf(params, "u[50]",PlayerPath)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unban <account>");
        format(PlayerPath, sizeof(PlayerPath), "/%s.ini", params);
        if(fexists(PlayerPath)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not registered.");
        new BanState;
        INI_Load(PlayerPath);
        INI:PlayerPath[](name[], value[])
        {
            INI_String("Banned"BanState);
        }
        if(BanState = 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Account is not marked as banned, unable to proceed with unbanning.");
        new INI:TheFile = INI_Open(PlayerFile);
        INI_WriteInt(TheFile,"Banned",0);
        INI_Close(TheFile);
        format(szString, sizeof(szString), "AdminCmd:If You Know '%s' Tell Him That He/She Has been unbanned By An Admin..", params);
        SendClientMessage(playerid, COLOR_GREEN, szString);
    }
    else {
        return 0;
    }
    return 1;
}
and get errors:
Quote:

C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1661) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1662) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1662) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1663) : error 017: undefined symbol "fexists"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1665) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 017: undefined symbol "@INI_PlayerPath_"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : error 017: undefined symbol "@INI_PlayerPath_"
C:\Documents and Settings\Ћeljko\Desktop\SA-MP Server\gamemodes\server.pwn(1666) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Errors.

Reply


Messages In This Thread
From dini to y_ini help +rep - by ThePrograme - 02.09.2012, 18:03
Re: From dini to y_ini help - by ThePrograme - 02.09.2012, 18:26
Re: From dini to y_ini help - by SAMPHacker - 02.09.2012, 18:37
Re: From dini to y_ini help - by ThePrograme - 02.09.2012, 18:54
Re: From dini to y_ini help - by SAMPHacker - 02.09.2012, 18:59
Re: From dini to y_ini help - by ThePrograme - 02.09.2012, 19:09
Re: From dini to y_ini help - by SAMPHacker - 02.09.2012, 19:18
Re: From dini to y_ini help - by ThePrograme - 02.09.2012, 19:44
Re: From dini to y_ini help - by ThePrograme - 03.09.2012, 11:34
Re: From dini to y_ini help - by IRio97 - 03.09.2012, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)