[INI Problem] Password don't save
#1

Hello, I've trying since last night to fix a bug. The passwords when you register, doesn't save. Don't insert any value.

Parts of code which may contain the bug:
pawn Код:
function OnPlayerRegister(playerid, inputtext[])
{
    if(IsPlayerConnected(playerid))
    {
        new passita[24];
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
        format(passita, sizeof(passita), "%s", inputtext);
        printf(passita);
        INI_WriteString(File,"Password", passita); //udb INI_WriteInt(File,"Password",udb_hash(password));
        INI_Close(File);
        TotalRegister++;
        SendClientMessageEx(playerid, COLOR_YELLOW, "Cuenta registrada, se ha iniciado sesiуn automбticamente.");
        OnPlayerLogin(playerid);
    }
    return 1;
}
pawn Код:
function LoadUser_pass(playerid,name[],value[])
{
    //INI_Int("Password",Info[playerid][pKey]);
    INI_String("Password",Info[playerid][pKey], 24);
    return 1;
}
pawn Код:
INI_WriteString(File,"Password",Info[playerid][pKey]);
Or this:
pawn Код:
if( strcmp( key , "Key" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(Info[playerid][pKey], val, 0, strlen(val)-1, 24); }
Heeelp please D:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)