MySQL password login problem.
#1

pawn Код:
public OnPlayerLogin(playerid,password[])
{
    new tmp2[256];
    new string2[64];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    MySQLFetchAcctSingle(playerid, "Password", PlayerInfo[playerid][pKey]);
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
        new Data[1024];
        new Field[64];
        new rcnt = 1;
        MySQLFetchAcctRecord(playerid, Data);
        if (rcnt == 3) PlayerInfo[playerid][pLevel] = strval(Field);
Alabala password, I write aa, I log
How do I fix?
Reply
#2

there should be ! before strcmp
e: noticed == 0, so it shouldnt be there
i think playerid in:
pawn Код:
MySQLFetchAcctSingle(playerid, "Password", PlayerInfo[playerid][pKey]);
should be sqlid ( i dont know what variable are you using to store sqlid, so replace it)
Reply
#3

moderntopia it is, but SQLID defined? I think not.
Reply
#4

PlayerInfo[playerid][pSQLID]
Reply
#5

nothing .. well ..
Reply
#6

reply?
Reply
#7

;| pls, reply?
Reply
#8

You can do this in a single query and a if(). I'm just wondering why you are doing it this way.
Reply
#9

Give me an example
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)