Server Shutsdown / Crashes When i Connect
#1

Hello,
When a Player connects to my server. The Server Shuts down, But i don't know why:

My OnPlayerConnect:

Код:
public OnPlayerConnect(playerid)
{
	GetPlayerName(playerid, Playername[playerid], MAX_PLAYER_NAME);
	
    CheckPlayerAccount(playerid);

	return 1;
}
My CheckPlayerAccount(playerid);

Код:
public CheckPlayerAccount(playerid)
{
	new EscapedName[MAX_PLAYER_NAME];
	new Query[128];
	
	mysql_real_escape_string(Playername[playerid], EscapedName);
	format(Query, sizeof(Query), "SELECT `id` FROM `%s` WHERE `pName` = '%s'", DB_USER_TABLE, EscapedName);
	mysql_query(Query);
	
	mysql_store_result();
	
	if(mysql_num_rows() >= 1)
	{
        PlayerInfo[playerid][pID] = mysql_fetch_int();
        mysql_free_result();
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Underground Roleplay - Account Login", "Please Login using your password", "Login", "Quit");
	}
	else
	{
	    mysql_free_result();
	    format(Query, 128, "Welcome to Underground Roleplay, %s \n\nPlease enter your password so we can create your account.",Playername[playerid]);
	    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Underground Roleplay - Account Registration", "Welcome, Please type in a password", "Register", "Quit");
		return 1;
	}
	return 1;
}
Does Someone know whats Wrong ?

Greetingz,
Gforcez
Reply
#2

Please Someone?
Reply
#3

I had a similar issue. If you haven't done so already, try to "drop" all of the account data within your MySQL database. So if you have an "Accounts" table, delete all of the user accounts in it. Hope this helps!
Reply
#4

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I had a similar issue. If you haven't done so already, try to "drop" all of the account data within your MySQL database. So if you have an "Accounts" table, delete all of the user accounts in it. Hope this helps!
Well, i have no accounts init, Thats the weirdest.
Reply
#5

Have you check 'mysql_log.txt' or 'server_log.txt'? You might also have 'crashinfo.txt'...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)