Problem with MySQL
#1

Hello, So the problem that I am facing is that whenever someone logs onto the server e.g. putting in their
password via MySQL it crashes the server, the errors I am getting from crash detect are:
Код:
[14/01/14 17:11:45] [join] Duck has joined the server (0:127.0.0.1)
[14/01/14 17:11:45] [debug] Server crashed while executing SAFR.amx
[14/01/14 17:11:45] [debug] AMX backtrace:
[14/01/14 17:11:45] [debug] #0 native mysql_fetch_field_row () [10006700] from mysql.DLL
[14/01/14 17:11:45] [debug] #1 00006f7c in public SSCANF_OnPlayerConnect (0x00000000) from SAFR.amx
[14/01/14 17:11:45] [debug] #2 00000788 in public OnPlayerConnect (0x00000000) from SAFR.amx
[14/01/14 17:11:46] [debug] Native backtrace:
[14/01/14 17:11:46] [debug] #0 6419b9f0 in ?? () from C:\WINDOWS\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\MSVCR90.dll
[14/01/14 17:11:46] [debug] #1 1000952e in ?? () from plugins\mysql.DLL
[14/01/14 17:11:46] [debug] #2 100067d3 in ?? () from plugins\mysql.DLL
[14/01/14 17:11:46] [debug] #3 004010b6 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #4 683058ca in ?? () from plugins\crashdetect.DLL
[14/01/14 17:11:46] [debug] #5 6830774f in ?? () from plugins\crashdetect.DLL
[14/01/14 17:11:46] [debug] #6 68300834 in ?? () from plugins\crashdetect.DLL
[14/01/14 17:11:46] [debug] #7 6830591a in ?? () from plugins\crashdetect.DLL
[14/01/14 17:11:46] [debug] #8 0046c990 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #9 00465e2f in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #10 00492dd6 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #11 00468f79 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #12 00492e91 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #13 004847a4 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #14 458d5151 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #15 15ff50f8 in ?? () from samp-server.exe
[14/01/14 17:11:46] [debug] #16 004a60c4 in ?? () from samp-server.exe
Please help if you can, Thank you
Reply
#2

Paste your login code please.


I would assume the issue lies within this, as shown in the crash logs (mysql_fetch_field_row)
Код:
[14/01/14 17:11:45] [debug] #0 native mysql_fetch_field_row () [10006700] from mysql.DLL
Reply
#3

It says it failed to execute the script.
Reply
#4

The line that the error is on is
Код:
mysql_fetch_field_row(string2, "Last_IP");
This is within the public OnPlayerConnet, it was fine untill the patch but it worked alittle after the batch as well..
Reply
#5

I've just realized that this is where the error is occurring, it only happens when the player that is already registered logs in; The problem doesn't happen when they are new to the server.
Код:
	if(Player_Data[playerid][Registered])
	{
		format(query, sizeof(query), "SELECT * FROM Player_Data WHERE Name = '%s'", PlayerName(playerid));
		mysql_query(query);
		mysql_store_result();
		mysql_fetch_row_format(query);
		mysql_fetch_field_row(string2, "Last_IP");
		strmid(Player_Data[playerid][Last_IP], string2, 0, strlen(string2), 24);
		mysql_free_result();
	}
	format(string2, sizeof(string2), "There are %d player[s] connected.", players_connected);
	SendClientMessage(playerid, WHITE, string2);

	players_connected++;

	#if defined DEBUG
		print("OnPlayerConnnet() called.");
	#endif
	format(string2, sizeof(string2), "%s has joined the server", PlayerName(playerid));
	SendClientMessageToAll(WHITE, string2);
	return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)