Out of curiosity..
#7

Sorry to bump, but a whole new error has occured. I now have this code OnPlayerLogin:

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();
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:

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

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.
Reply


Messages In This Thread
SQL Hanging Fail? - by Lewwy - 13.09.2010, 20:40
Re: Out of curiosity.. - by Scenario - 13.09.2010, 21:11
Re: Out of curiosity.. - by Toni - 13.09.2010, 21:14
Re: Out of curiosity.. - by Lewwy - 14.09.2010, 07:04
Re: Out of curiosity.. - by Toni - 14.09.2010, 11:17
Re: Out of curiosity.. - by Lewwy - 14.09.2010, 15:47
Re: Out of curiosity.. - by Lewwy - 14.09.2010, 17:22
Re: Out of curiosity.. - by Lewwy - 15.09.2010, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)