MySQL Problem
#9

Oh, i found the mysql.log in the logs folder:

mysql_tquery: callback error: callback "OnPlayerDataCheck" does not exist

but the function is forwarded and exists

Код:
forward public OnPlayerChecked(playerid);
public OnPlayerChecked(playerid)
{
	new DB_Query[115];
	mysql_format(Database, DB_Query, sizeof(DB_Query), "SELECT * FROM `users` WHERE `Username` = '%e' LIMIT 1", pInfo[playerid][Name]);
	mysql_tquery(Database, DB_Query, "OnPlayerDataCheck", "ii", playerid, Corrupt_Check[playerid]);
	TextDrawShowForAll(Text:blackbox);
	return 1;
}

forward public OnPlayerDataCheck(playerid, corrupt_check);
public OnPlayerDataCheck(playerid, corrupt_check)
{
	if(corrupt_check != Corrupt_Check[playerid]) return Kick(playerid);

	if(cache_num_rows() > 0)
	{	
		cache_get_value(0, "Password", pInfo[playerid][Password], 65);
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", "Welcome to *********.\n\nPlease enter you password below!", "Login", "Cancel");
	}
	else
	{
		 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "SERVER: Registration", "Welcome to *********.\n\nPlease enter your desired password below!", "Register", "Cancel");
	}
	return 1;
}
Reply


Messages In This Thread
MySQL Problem - by C0oL3r - 04.02.2018, 22:37
Re: MySQL Problem - by Sew_Sumi - 04.02.2018, 22:38
Re: MySQL Problem - by C0oL3r - 04.02.2018, 22:53
Re: MySQL Problem - by PepsiCola23 - 04.02.2018, 23:17
Re: MySQL Problem - by C0oL3r - 04.02.2018, 23:24
Re: MySQL Problem - by Sew_Sumi - 04.02.2018, 23:37
Re: MySQL Problem - by C0oL3r - 04.02.2018, 23:50
Re: MySQL Problem - by Sew_Sumi - 05.02.2018, 00:08
Re: MySQL Problem - by C0oL3r - 05.02.2018, 00:13
Re: MySQL Problem - by Kane - 05.02.2018, 00:19

Forum Jump:


Users browsing this thread: 1 Guest(s)