Register/Login System Bug
#1

Okay, now on my server when i connect and register, it doesn't save the INI file which its suppose to do so it can save the file, but other than that, when i disconnect from the server the Account's INI file appears on the folder but it doesnt contain the password line, so if i join and write anything in the login dialog box it logs in, so idk whats wrong, but the bug is that it isnt saving my password correctly here are some lines from the script


pawn Код:
if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_REGISTER_1, DIALOG_STYLE_INPUT, ""COLOR_WHITE"Registering...",""COLOR_RED"You have entered an invalid password.\n"COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
                }

                if(INI_Open(getINI(playerid))) {
                INI_WriteString("Password",inputtext);
                INI_WriteInt("Level",1);
                INI_WriteInt("Money",5000);
                INI_WriteInt("Admin",0);
                INI_WriteInt("Gender",0);
                INI_WriteInt("Age",0);

                INI_Save();
                INI_Close();

pawn Код:
}
public OnPlayerDisconnect(playerid, reason)
{
    if(INI_Open(getINI(playerid))) {

    INI_WriteInt("Level",PlayerInfo[playerid][pLevel]);
    INI_WriteInt("Money",GetPlayerMoney(playerid));
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt("Age",PlayerInfo[playerid][pAge]);
    INI_WriteInt("Gender",PlayerInfo[playerid][pGender]);
   

    INI_Save();
    INI_Close();
    }
    return 1;
}
Reply


Messages In This Thread
Register/Login System Bug - by X|Dragon|X - 13.01.2015, 16:16
Re: Register/Login System Bug - by Threshold - 13.01.2015, 16:22
Re: Register/Login System Bug - by X|Dragon|X - 13.01.2015, 16:23
Re: Register/Login System Bug - by Threshold - 13.01.2015, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)