dini_IntSet bugs the account and causes "incorrect password"
#1

Hi guys.

So I'm having trouble with my unban command. I tried to re-do it and it still gave me troubles. There's two values that I set to a users' user file, and when they attempt to log back in, it says "incorrect password" even though it's the correct password. It's nothing to do with the login code because that works before I ban and unban someone. It's just when I ban someone and then unban someone, it does this.

Here is the unban code:
pawn Code:
CMD:unban(playerid, params[])
{
    new user[126];
    if(sscanf(params, "s", user)) return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /unban [player name (case sensitive)]");
   
    new string[129], string2[256];
    format(string, sizeof(string), "%s.ini", user);
   
    if(dini_Exists(string))
    {
        if(dini_Int(string, "Band") > 0)
        {
            dini_Set(string, "Band", 0);
            dini_Set(string, "Warnings", 0);
            string2 = dini_Get(string, "IP");
            format(string, sizeof(string),"unbanip %s", string2);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            format(string, 256, "AdmWarning: %s has unbanned account '%s' and IP '%s'.",PlayerName(playerid),user,string2);
            ABroadCast(COLOR_LIGHTRED, string, 1);
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "* That user is not banned.");
            string2 = dini_Get(string, "IP");
            format(string, sizeof(string), "unbanip %s", string2);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "* User account not found !");
    }

    return 1;
}
As you can see all I do is set 2 values to the file with Dini. I'm not sure why it would do this.
Reply


Messages In This Thread
dini_IntSet bugs the account and causes "incorrect password" - by Jack_Leslie - 12.12.2011, 07:27
Re: dini_IntSet bugs the account and causes "incorrect password" - by Emmet_ - 12.12.2011, 07:44
Re: dini_IntSet bugs the account and causes "incorrect password" - by Jack_Leslie - 12.12.2011, 07:49
Re: dini_IntSet bugs the account and causes "incorrect password" - by Emmet_ - 12.12.2011, 07:54
Re: dini_IntSet bugs the account and causes "incorrect password" - by Jack_Leslie - 12.12.2011, 07:58

Forum Jump:


Users browsing this thread: 2 Guest(s)