MySQL database stops working
#1

So I have a really weird bug.. login dialog doesen't appear when there are about 10 players in the server. I would really love some help because I cant figure it out and I cant get my playerbase up.

This is the last thing in my Mysql log:
Код:
15:13:29] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1"
[15:13:29] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `accounts` WHERE `Name` = 'John_Eazzy' LIMIT 1", callback: "OnAccountCheck", format: "i"
[15:13:29] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[15:13:29] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM `accounts` WHERE `Name` = 'John_Eazzy' LIMIT 1"..
[15:13:29] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - starting query execution
[15:13:29] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - query was successful
[15:13:29] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[15:13:29] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - data being passed to ProcessCallbacks()
[15:13:29] [DEBUG] Calling callback "OnAccountCheck"..
[15:13:29] [DEBUG] cache_get_data - connection: 1
[15:13:29] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[15:13:29] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
[15:13:32] [DEBUG] mysql_format - connection: 1, len: 512, format: "INSERT INTO `accounts` (`Name`, `Password`, `Admin`, `VIP`, `Warnings`, `Score`, `Money`, `IP`, `Kills`, `Deaths`, `Points`) VAL..."
[15:13:32] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `accounts` (`Name`, `Password`, `Admin`, `VIP`, `War", callback: "OnAccountRegister", format: "i"
[15:13:32] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[15:13:32] [DEBUG] mysql_tquery - scheduling query "INSERT INTO `accounts` (`Name`, `Password`, `Admin`, `VIP`, `Warnings`, `Score`, `Money`, `IP`, `Kills`, `Deaths`, `Points`) VALUES ('John_Eazzy', 'C5F5ADF620B4B6FA3B8C6F7920896A1B7EB9DF35D9968124726E3BD38B92FE0160090202DB55A7C00A1796D3473B66A563C3D2C4435E10C3FD670FE62D7727F6', 0, 0, 0, 0, 0, '178.65.105.238', 0, 0, 0)"..
[15:13:32] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - starting query execution
[15:13:32] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - query was successful
[15:13:32] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[15:13:32] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - data being passed to ProcessCallbacks()
[15:13:32] [DEBUG] Calling callback "OnAccountRegister"..
[15:13:32] [DEBUG] cache_insert_id - connection: 1
[15:13:32] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[15:13:32] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
So this is my login/register system:

OnPlayerConnect:
Код:
ShowWelcomeTextdraw(playerid);
SetTimerEx("PreOnAccountCheck", 5000, false, "i", playerid);
	TogglePlayerSpectating(playerid, 1);
The checking:

Код:
forward PreOnAccountCheck(playerid);
public PreOnAccountCheck(playerid)
{
	new query[128];
	HideWelcomeTextdraw(playerid);
    mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name(playerid));
    mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
	return 1;
}

forward OnAccountCheck(playerid);
public OnAccountCheck(playerid)
{

	print("Checking the account..");

    new
        rows,
        fields;
    cache_get_data(rows, fields, mysql);

    if(rows)
    {
        cache_get_field_content(0, "Password", PlayerInfo[playerid][pPassword], mysql, 129);
        PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");

        ShowLoginDialog(playerid);
        print("Account exists!\n");
    }
    else
    {
        ShowRegisterDialog(playerid);
		print("Account doesen't exist!\n");
    }
    return true;
}
I really cant get this figured out.. just when there are like 7-8-9-10 players online it starts to bug out, people dont get the dialog, start to spawn in random places.. they just join and get automatically spawned.

Huge, huge thanks to anyone who can help me out here.. it's really annoying for me and my players.
Reply


Messages In This Thread
MySQL database stops working - by sjames - 06.08.2015, 19:29
Re: MySQL database stops working - by sjames - 06.08.2015, 19:55
Re: MySQL database stops working - by sjames - 06.08.2015, 21:56
Re: MySQL database stops working - by sjames - 07.08.2015, 10:45
Re: MySQL database stops working - by xVIP3Rx - 07.08.2015, 11:07
Re: MySQL database stops working - by sjames - 07.08.2015, 11:19
Re: MySQL database stops working - by xVIP3Rx - 07.08.2015, 11:48
Re: MySQL database stops working - by Jacket - 07.08.2015, 12:07
Re: MySQL database stops working - by sjames - 07.08.2015, 12:09

Forum Jump:


Users browsing this thread: 1 Guest(s)