Password Hash Problem & MYSQL Saving Problem -
Faqahat - 17.04.2016
Hello,
I was having problem while comparing password hashes while logging in so i printed both the hashes but one of them wasn't complete i cant figur out what the problem is exactly since variable are all greater then 128.
This is the password in Database
Here i am saving it in a variable:
(OnAccountCheck)
Here i am hashing entered password , printing and comparing
Here is the output
im having a syntax error in this query
Re: Password Hash Problem & MYSQL Saving Problem -
introzen - 18.04.2016
In
PHP Code:
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `xLevel` = %d, `Toys` = %d, `Neons` = %d, `BoomBox` = %d, `Banned` = %d, `xVIP` = %d, `Score` = %d, `Respect` = %d, `Credits` = %d, `Drugs` = %d, `Kills` = %d, `Deaths` = %d, `MaxSpree` = %d, `TotalDuels` = %d, `DuelsWon` = %d, `DuelsLost` = %d,`Skin` = %d,`Muted` = %d,`Cash`= %d, `TotalSeconds` = %d, `LastLoggedIP` = '%e',`LastSeen` = '%e', WHERE `p_id` = %d ", pInfo[playerid][pLevel], pInfo[playerid][Toys], pInfo[playerid][Neons], pInfo[playerid][BoomBox], pInfo[playerid][Banned], pInfo[playerid][VIP], GetPlayerScore(playerid), pInfo[playerid][Respect], pInfo[playerid][credits], pInfo[playerid][Drugs], pInfo[playerid][Kills], pInfo[playerid][Deaths], pInfo[playerid][MaxSpree], pInfo[playerid][TotalDuels], pInfo[playerid][DuelsWon], pInfo[playerid][DuelsLost], pInfo[playerid][Skin], pInfo[playerid][Muted], GetPlayerMoney(playerid), seconds, pIP, str, pInfo[playerid][p_id]);
mysql_tquery(mysql, query, "OnStatsSave", "i", playerid);
Change
PHP Code:
`LastSeen` = '%e', WHERE `p_id` = %d
To
PHP Code:
`LastSeen` = '%e' WHERE `p_id` = %d
Also show us your pInfo enum please.
Re: Password Hash Problem & MYSQL Saving Problem -
Threshold - 18.04.2016
You're using printf instead of print. Also, I'm gonna go ahead and assume that you've only given p_password 100 cells instead of 129...
Change
to:
Re: Password Hash Problem & MYSQL Saving Problem -
Faqahat - 18.04.2016
Quote:
Originally Posted by introzen
In
PHP Code:
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `xLevel` = %d, `Toys` = %d, `Neons` = %d, `BoomBox` = %d, `Banned` = %d, `xVIP` = %d, `Score` = %d, `Respect` = %d, `Credits` = %d, `Drugs` = %d, `Kills` = %d, `Deaths` = %d, `MaxSpree` = %d, `TotalDuels` = %d, `DuelsWon` = %d, `DuelsLost` = %d,`Skin` = %d,`Muted` = %d,`Cash`= %d, `TotalSeconds` = %d, `LastLoggedIP` = '%e',`LastSeen` = '%e', WHERE `p_id` = %d ", pInfo[playerid][pLevel], pInfo[playerid][Toys], pInfo[playerid][Neons], pInfo[playerid][BoomBox], pInfo[playerid][Banned], pInfo[playerid][VIP], GetPlayerScore(playerid), pInfo[playerid][Respect], pInfo[playerid][credits], pInfo[playerid][Drugs], pInfo[playerid][Kills], pInfo[playerid][Deaths], pInfo[playerid][MaxSpree], pInfo[playerid][TotalDuels], pInfo[playerid][DuelsWon], pInfo[playerid][DuelsLost], pInfo[playerid][Skin], pInfo[playerid][Muted], GetPlayerMoney(playerid), seconds, pIP, str, pInfo[playerid][p_id]);
mysql_tquery(mysql, query, "OnStatsSave", "i", playerid);
Change
PHP Code:
`LastSeen` = '%e', WHERE `p_id` = %d
To
PHP Code:
`LastSeen` = '%e' WHERE `p_id` = %d
Also show us your pInfo enum please.
|
Quote:
Originally Posted by Threshold
You're using printf instead of print. Also, I'm gonna go ahead and assume that you've only given p_password 100 cells instead of 129...
Change
to:
|
Thanks The issue is resolved