Y_ini bugs , Password is not showing ++Rep
#3

If you didn't notice, you are using DIALOG_REGISTER twice here:

pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //Line 522
    }

    return 1;
}
So you need the login dialog in OnPlayerConnect.

Also, the order of loaduser_data isn't the same as in onplayerdisconnect.

So I will give you the correct OnPlayerDisconnect:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("RectionTests",PlayerInfo[playerid][pReactionTests]);
    INI_Int("Moneybags",PlayerInfo[playerid][pMoneyBags]);
    INI_Int("Warned",PlayerInfo[playerid][pWarned]);
    INI_Int("Kicked",PlayerInfo[playerid][pKicked]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Close(File);
    return 1;
}

Reminder: You have 2 DIALOG_REGISTER dialogs in your OnPlayerConnect, put a DIALOG_LOGIN dialog in it..

If all this didn't work, give me your OnDialogResponse code.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)