Crash on connect -
Klutty - 17.06.2009
Hello, I have made my own Gamemode, ehm, around 1500 lines..
When you connect, it shows all the game text "welcome to the server" etc etc.
But then you just crash!
Im using a Objectstreamer (MidoStream) and it has around 8000+ objects.
I dont know why you crash.
Here's my GameModes OnPlayerConnect:
pawn Code:
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "CONNECT: %s has joined the server",playername);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
SendClientMessage(playerid,COLOR_GREEN,"Welcome to Xtreme Stunting!");
SendClientMessage(playerid,COLOR_GREEN,"Please report all bugs to the admins (/admins).");
GivePlayerMoney(playerid,50000);
GameTextForPlayer(playerid, "Welcome to the Server!",5000,5);
TextDrawShowForAll(Textdraw0);
TextDrawShowForPlayer(playerid, Text:InfoLoading);
Why am I crashing? Is it the streamer?
Re: Crash on connect -
Luka P. - 17.06.2009
Make DEBUG messages.
And maybe is something wrong in next public, OnPlayerRequestClass
Re: Crash on connect -
Klutty - 17.06.2009
I tried without even loading the MidoObjects, and it still crashes..
Here's my RequestClass blah blah:
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
SetPlayerPos(playerid, 1955.4611,1343.1101,15.3746);
SetPlayerCameraPos(playerid, 1959.0073,1343.2251,15.3746);
SetPlayerCameraLookAt(playerid, 1955.4611,1343.1101,15.3746);
ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
return 1;
}
Re: Crash on connect -
Luka P. - 17.06.2009
Make Debug message after every action.
Something like:
print("DEBUG test 1 passed");
Re: Crash on connect -
Klutty - 17.06.2009
I did DEBUG tests after every action in OnPlayerConnect.
All of them print in the server.exe window...
Re: Crash on connect -
Luka P. - 17.06.2009
Now Debug onplayerrequestclass
Re: Crash on connect -
Klutty - 17.06.2009
Okey I debugged it. And the problem is there, I will try to remove some code there and see what happens..
EDIT: The debug code at OnPlayerRequestClass doesnt show up and im still crashing!!
Re: Crash on connect -
Luka P. - 17.06.2009
Doesn`t showing? Make new code!
Re: Crash on connect -
Klutty - 17.06.2009
Quote:
Originally Posted by Luka™
Doesn`t showing? Make new code!
|
What do you mean exactly?
Re: Crash on connect -
Luka P. - 17.06.2009
Change your OnPlayerRequestClass with some new code
from other gamemode.Try whatever