15.08.2013, 15:42
Thanks. If anyone has a problem, feel free to ask.
INI_WriteString(File, "Ip", IP, 22);
new INI:File = INI_Open(UserPath(filestring));
// error 035: argument type mismatch (argument 1)
if(sscanf(params, "s[24]", targetname)) return SendClientMessage(playerid, -1, "COMMAND: /banofflineplayer [Player's name]") |
(2217) : error 028: invalid subscript (not an array or too many subscripts): "BannedIP"
(2217) : warning 215: expression has no effect
(2217) : error 001: expected token: ";", but found "]"
(2217) : error 029: invalid expression, assumed zero
(2217) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
format(cmdstring, sizeof(cmdstring), "unbanip %s", BannedIP[playerid]);
CMD:unbanofflineplayer(playerid, params[])
{
new string[128],tname[24];
if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1,"Correct Usage: /unbanofflineplayer [Player Name] ");
new filestring[79];
format(filestring, sizeof(filestring), "/Users/%s.ini", tname);
if(!fexist(filestring)) return SendClientMessage(playerid, -1, "The name you've chosen was not found in our database ");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteInt(File, "Banned",0);
INI_Close(File);
INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid);
new cmdstring[44];
format(cmdstring, sizeof(cmdstring), "unbanip %s", BannedIP[playerid]);
SendRconCommand(cmdstring);
SendRconCommand("reloadbans");
new done[128];
format(done, sizeof(done),"You have successfully unbanned %s", tname);
SendClientMessage(playerid, -1,done);
}
return 1;
}
PlayerInfo[playerid][BannedIP]
warning 235: public function lacks forward declaration (symbol "LoadIP_data")
public LoadIP_data(playerid, name[], value[])