INI_Load problems, still
#1

So, I now figured out the problem isn't with Y_ini here. First, let's see the code
pawn Код:
new Input[MAX_PASSWORD], Password[MAX_PLAYERS][MAX_PASSWORD], gPass[MAX_PASSWORD];

INI:playerlist[](name[], value[])
{
    INI_String(Input, gPass, sizeof(Input));
    return 0;
}

stock CheckPlayer(playerid){
    if(strlen(Password[playerid]) == 0){
        ShowPlayerDialog(playerid, 30, 1, "Register", "To register you must first give in the first name of your character.", "OK", "");
        return 1;
    }
    else{
        ShowPlayerDialog(playerid, 33, 1, "Login", "Please give in your password.", "OK", "");
        return 1;
    }
}

public OnPlayerConnect(playerid){
    strdel(Input, 0, MAX_PLAYER_NAME);
    GetPlayerName(playerid, Input, sizeof(Input));
    INI_Load("playerlist.ini");
    strpack(Password[playerid], gPass, sizeof(gPass));]
    SendClientMessage(playerid, COLOR_WHITE, Input);
    SendClientMessage(playerid, COLOR_WHITE, gPass);
    CheckPlayer(playerid);
    return 1;
}
My file looks like this
Код:
Max_Havelaar = mypass
Harr_Levis = mypass3
Lead_Admin = mypass67
When you log in as Harr_Levis, that name will be put in Input and the playername (Harr_Levis) and his password (mypass3) will be send to the player after each other. When I next log in with Lead_Admin for example, the playername will still be send to the player (Lead_Admin) but the password which is send is still the password from Harr_Levis (mypass3 and not mypass67). This means something is not right with Input, but I don't know what is going wrong exactly and how to solve it. I tried manually giving Input values (
pawn Код:
strpack(Input, "Harr_Levis", sizeof(Input))
) and with that I could get more than one value out of the file using gPass to store it in. SO Y_ini can't be the problem here, I think it is Input.

Please don't respond if you don't know what the problem is or how to solve it.

Thanks.
Reply


Messages In This Thread
INI_Load problems, still - by Anteino - 28.04.2011, 11:49
Re: INI_Load problems, still - by Anteino - 01.05.2011, 13:58
Re: INI_Load problems, still - by Anteino - 01.05.2011, 19:44
Re: INI_Load problems, still - by Anteino - 02.05.2011, 15:18
Re: INI_Load problems, still - by Anteino - 02.05.2011, 16:36
Re: INI_Load problems, still - by Anteino - 02.05.2011, 22:27
Re: INI_Load problems, still - by Anteino - 03.05.2011, 08:47

Forum Jump:


Users browsing this thread: 1 Guest(s)