Unban Troubles
#6

To add to Thresholds answer.

Both "GetName" and "Path" function have an int as their parameters. You're passing an array. Also if with sscanf specifier "u" you will get a players ID(or INVALID_PLAYER_ID) NOT his name.
pawn Код:
ACMD:unban(playerid, params[])
{
    new targetid, str[128];
    if(sscanf(params,"u",targetid)) return SCM(playerid,-1, "--- /unban {33CCFF}<ID/Name>{FFFFFF}---");
   
    new INI:file = INI_Open(Path(targetid)); //Line 711
    INI_SetTag(file, "Player's Data");
    INI_WriteInt(file, "Banned", 0);
    INI_Close(file);
    format(str, sizeof(str), "You have unbanned %s", GetName(targetid));  //Line 715
    SCM(playerid, -1, str);
    return 1;
}
Changing "targetid" to a an int will solve your errors.
Reply


Messages In This Thread
Unban Command giving errors - by Jakwob - 22.10.2014, 17:50
Re: Unban Troubles - by dusk - 22.10.2014, 18:10
Re: Unban Troubles - by gurmani11 - 22.10.2014, 18:14
Re: Unban Troubles - by Jakwob - 22.10.2014, 18:16
Re: Unban Troubles - by Threshold - 22.10.2014, 22:40
Re: Unban Troubles - by dusk - 23.10.2014, 09:40

Forum Jump:


Users browsing this thread: 2 Guest(s)