Crash on connect
#1

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?
Reply
#2

Make DEBUG messages.
And maybe is something wrong in next public, OnPlayerRequestClass
Reply
#3

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;
}
Reply
#4

Make Debug message after every action.
Something like:

print("DEBUG test 1 passed");
Reply
#5

I did DEBUG tests after every action in OnPlayerConnect.

All of them print in the server.exe window...
Reply
#6

Now Debug onplayerrequestclass
Reply
#7

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!!
Reply
#8

Doesn`t showing? Make new code!
Reply
#9

Quote:
Originally Posted by Luka™
Doesn`t showing? Make new code!
What do you mean exactly?
Reply
#10

Change your OnPlayerRequestClass with some new code
from other gamemode.Try whatever
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)