unchangable variable
#1

I got this code (part of my code)
pawn Код:
new PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME], Password[MAX_PLAYERS][MAX_PASSWORD];

INI:playerlist[](playerid, name[], value[])
{
    INI_String(PlayerName[playerid], Password[playerid], MAX_PASSWORD);
    return 0;
}

stock CheckPlayer(playerid){
    GetPlayerName(playerid, PlayerName[playerid], MAX_PLAYER_NAME);
    INI_Load("playerlist.ini", true, playerid); // if set to true, playerid will be passed over to INI:playerlist[...
    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;
    }
}
When I first log in with playername Max_Havelaar and his password is mypass I will succeed. But when I log in with Lead_Admin and his pass is mypass2 I can still only log in with mypass. This means the Password[playerid] won't be overwritten, which is a problem. I've tried to empty Password[playerid] after every log in by that playerid but then it'll be permanently empty and still no value can be assigned to it :S

How to solve this? I've tried everything
Reply


Messages In This Thread
unchangable variable - by Anteino - 19.04.2011, 20:40
Re: unchangable variable - by airsoft - 19.04.2011, 22:38
Re: unchangable variable - by Anteino - 20.04.2011, 06:06
Re: unchangable variable - by Anteino - 21.04.2011, 05:55
Re: unchangable variable - by X3nZ - 21.04.2011, 06:26
Re: unchangable variable - by Anteino - 21.04.2011, 21:48
Re: unchangable variable - by Anteino - 23.04.2011, 18:52
Re: unchangable variable - by Anteino - 24.04.2011, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)