19.06.2012, 14:42
well, at moment I use y_ini system of saving stuff, I wanted make a simple ban and unban system for my server but when I want to unban ip from rcon cmd I get 2 error of getting the ip
the line get error that of INI_String
any one know what its wrong?
pawn Код:
if(strcmp(cmd,"/unban",true) == 0)
{
new string[256],ip[128];
if(GetPlayerAdminz(playerid) < 1) return 0;
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))return SendClientMessage(playerid, COLOR_WHITE, "( ! ) /unban (name)");
if(fexist(result))
{
new INI:File = INI_Open(result);
INI_String("IP",ip,128); // line: 9294
INI_Close(File);
format(string,sizeof(string),"unbanip %s",ip);
SendRconCommand(string);
SendRconCommand("reloadbans");
format(string,sizeof(string),"( ! ) %s has been unbanned by %s.",result,PlayerName(playerid));
MessageToAdmins(COLOR_RED,string);
}
else
{
scm(playerid,c_r,"( ! ) This player not exist !");
}
return 1;
}
Код:
D:\Programs\proecte ne terminate\samp\gamemodes\rpg.pwn(9294) : error 017: undefined symbol "name" D:\Programs\proecte ne terminate\samp\gamemodes\rpg.pwn(9294) : error 017: undefined symbol "value"
any one know what its wrong?