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


Messages In This Thread
Server Shutsdown / Crashes When i Connect - by Gforcez - 01.09.2010, 18:50
Re: Server Shutsdown / Crashes When i Connect - by Gforcez - 02.09.2010, 13:52
Re: Server Shutsdown / Crashes When i Connect - by Scenario - 02.09.2010, 13:56
Re: Server Shutsdown / Crashes When i Connect - by Gforcez - 02.09.2010, 14:08
Re: Server Shutsdown / Crashes When i Connect - by Scenario - 02.09.2010, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)