10.03.2013, 04:24
So my code is giving error whenever I try to insert a query with password hashed with Whirlpool.
Side Note: The third print doesn't work with Whirlpool.
Код:
[10:00:14] ProcessQueryThread(RegPlayer) - Executing query INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('hue', 'FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B9518062... [10:00:14] ProcessQueryThread(RegPlayer) - Error will be triggered to OnQueryError().
Код:
[10:03:47] ProcessQueryThread(RegPlayer) - Executing query INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('hue', '123456', 0, '127.0.0.1')... [10:03:47] ProcessQueryThread(RegPlayer) - Query was successful. [10:03:47] ProcessQueryThread(RegPlayer) - Data being passed to ProcessTick().
pawn Код:
WP_Hash(buf, sizeof(buf), inputtext);
format(query, sizeof(query), "INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('%s', '%s', 0, '%s')", GetPnameid(playerid), buf, PlayerInfo[playerid][Ip]);
print("derp");
mysql_function_query(conhandle, query, false, "RegPlayer", "i", playerid);
print("derp2");
pawn Код:
public RegPlayer(playerid)
{
PlayerInfo[playerid][SQLid] = mysql_insert_id();
print("derp3");
return 1;
}