02.09.2012, 19:09
Well here:
and get errors:
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;
}
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. |