14.09.2010, 17:22
Sorry to bump, but a whole new error has occured. I now have this code OnPlayerLogin:
After I enter my pass and the sscanf line is called, the server will hang and my connection to the server will be lost. In the MySQL logs the log ends at this moment:
I have tried removing things after the sscanf line, and still no luck. It looks like something is going wrong while fetching the data from sscanf, it no longer has anything to do with the PVars. Any ideas?
EDIT: The real spawn code is just SpawnPlayer.
pawn Code:
sscanf(line, "p<|>s[24]s[15]s[50]dd", username, password, ip, skin, factionid);
SetPVarInt(playerid, "LoggedIn", 1);
SetPVarInt(playerid, "Skin", skin);
SetPVarInt(playerid, "Faction", factionid);
RealSpawn(playerid);
mysql_free_result();
Quote:
[19:23:35] >> mysql_query( Connection handle: 1 ) [19:23:35] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `username` = 'Lewwy') - Successfully executed. [19:23:35] >> mysql_store_result( Connection handle: 1 ) [19:23:35] CMySQLHandler::StoreResult() - Result was stored. [19:23:35] >> mysql_num_rows( Connection handle: 1 ) [19:23:35] CMySQLHandler::NumRows() - Returned 1 row(s) [19:23:36] >> mysql_query( Connection handle: 1 ) [19:23:36] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `username` = 'Lewwy' AND `password` = 'password') - Successfully executed. [19:23:36] >> mysql_store_result( Connection handle: 1 ) [19:23:36] CMySQLHandler::StoreResult() - Result was stored. [19:23:36] >> mysql_num_rows( Connection handle: 1 ) [19:23:36] CMySQLHandler::NumRows() - Returned 1 row(s) [19:23:36] >> mysql_fetch_row_format( Connection handle: 1 ) [19:23:36] CMySQLHandler::FetchRow() - Return: Lewwy|password|127.0.0.1|281|1 |
EDIT: The real spawn code is just SpawnPlayer.