Need Help!
#1

I am a intermediate scripter, having scripted privately for a few months.
I am currently in the process of building a roleplay server, but I am having a problem on finalizing it.

This is my problem, when I connect a player to my server, once the player has passed the loading screen & Connecting to (127.0.0.1:7777). The server stops itself & ends server.exe. I am having little to no luck what-so-ever on fixing this, would you be so kind to assist me in my progress.


When I connect via LOCALHOST, the server.exe starts fine, I connect via SA:MP Client, Pass loading screen, once it begins showing the text, it says USER has connected then server.exe crashes. Hope that explains it.

Код:
public OnPlayerConnect(playerid)
{
	//if(IsPlayerNPC(playerid)) return 1;
	F_OnPlayerConnect(playerid);

//	ClearVars(playerid);
//	SyncCheckpoints(playerid);

    Inf[playerid] = 1;
    gPlayerUsingLoopingAnim[playerid] = 0;
	gPlayerAnimLibsPreloaded[playerid] = 0;
	PlayerInfo[playerid][EngineOff] = 0;
	pInfo[playerid][driver] = 0;
	
	PlayerInfo[playerid][Warnings] = 0;
	
	TextDrawShowForPlayer(playerid,txtGMName);


	//time();
	//F_GivePlayerMoney(playerid,50000);
	
	if(udb_Exists(ReturnPlayerName(playerid)))
	{ //account exists
	    SendClientMessage(playerid, COLOR_RED, "Welcome to NaPalm Roleplay!");
		SendClientMessage(playerid,COLOR_MAIN,"We'd like to welcome you back to the server. Please enjoy your stay.");
		SendClientMessage(playerid,COLOR_MAIN,"Please use /login [password] to login to your account now.");
	    SendClientMessage(playerid,COLOR_MAIN,"Lets Roleplay, Baby!");
	}
	else
	{
Reply
#2

Is this the whole of OnPlayerConnect or is there more?
Reply
#3

Quote:
Originally Posted by Firzendxiw
Посмотреть сообщение
Is this the whole of OnPlayerConnect or is there more?
There is obviously more..it just ends and he is afraid someone will steal his 'precious' code.
Reply
#4

Debug it with prints.
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
    print("1");
    //if(IsPlayerNPC(playerid)) return 1;

    F_OnPlayerConnect(playerid);
print("2");
//  ClearVars(playerid);
//  SyncCheckpoints(playerid);

    Inf[playerid] = 1;
print("3");
    gPlayerUsingLoopingAnim[playerid] = 0;
print("4");
Etc... and see how much of it loads, then you will find your problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)