SA-MP Forums Archive
How do I know why the server crashes? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do I know why the server crashes? (/showthread.php?tid=68815)



How do I know why the server crashes? - Shellegg - 13.03.2009

How do i know that?
my server crashes before appearing that message "connected to server...."

how do i know why this crashes?


Re: How do I know why the server crashes? - lesley - 13.03.2009

look into your server log file..


Re: How do I know why the server crashes? - Shellegg - 13.03.2009

only says me:

[19:29:06] Incomming connection: 84.90.114.155:61715
[19:29:06] [join] Theodoro_Johnson has joined the server (0:84.90.114.155)
[19:29:22] [part] Theodoro_Johnson has left the server (0:0)
[19:29:23] Incomming connection: 84.90.114.155:65077
[19:29:23] [join] Theodoro_Johnson has joined the server (0:84.90.114.155)
[19:29:36] [part] Theodoro_Johnson has left the server (0:0)


Re: How do I know why the server crashes? - tehcudguy - 13.03.2009

When a player disconnects it shows whether the player crashed or left on the server log.

(ID:REASON)

(ID:0) -> They crashed
(ID:1) -> Left normally
(ID:2) -> Kicked


Re: How do I know why the server crashes? - Shellegg - 13.03.2009

ye i knew that he crashed, but why it crashes? if he is connecting to the server? the compile is fine.


Re: How do I know why the server crashes? - tehcudguy - 13.03.2009

Quote:
Originally Posted by Shellegg
ye i knew that he crashed, but why it crashes? if he is connecting to the server? the compile is fine.
Post your OnPlayerConnect code..


Re: How do I know why the server crashes? - Shellegg - 13.03.2009

Quote:

public OnPlayerConnect(playerid)
{
//==================[Join Counter]=========================
JoinCounter = JoinCounter + 1;
dini_IntSet("CRP_Scriptfiles/Other/JoinCounter.cfg", "Connections", JoinCounter);
//================================================== =======

ResetStats(playerid);//Setting variables to 0.
ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
ShowScriptStats(playerid);//Showing the script information.
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
if(RPName(PlayerName(playerid),first,last))
{
SendClientMessage(playerid,COLOR_YELLOW,"_________ _________________________________________________" );
SendClientMessage(playerid,COLOR_LIGHTYELLOW2," LOGIN ");
new sendername[MAX_PLAYER_NAME];
new accstring[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", sendername);
new File: hFile = fopen(accstring, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Jб estбs registado, escreve a tua password para fazeres o login");
fclose(hFile);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Ainda nгo estбs registado, escreve a tua password em baixo para o fazeres.");
}
SendClientMessage(playerid,COLOR_YELLOW,"_________ ________________________________________________") ;
}
else
{
KickPlayer(playerid," o Merdas","Nome Invбlido, Formato Correcto: Nome_Apelido.");
}
return 1;
}




Re: How do I know why the server crashes? - maij - 14.03.2009

it doesnt have to be onplayerconnect at all, it can be any function or callback;

basicly your code is out of array somewhere, or tries to hold something it cant hold;

your compiled script is not fine, it only doesnt show any error because the array size you entered with out of array is a variable, and the compiler doesnt read the number that indicates an array
**i speak from experience, i had this before with my own house system**


Re: How do I know why the server crashes? - blastervirus - 14.03.2009

Quote:
Originally Posted by Shellegg
How do i know that?
my server crashes before appearing that message "connected to server...."

how do i know why this crashes?
check/repair your gamemode, almost sure that you have make mistake there.

Do you have add lots's of objects ? yes,then you have to use object streamer...

Do you have add lots's of objects ? no,well I'm afraid i don't know it eihter...

(you can also have that the filterscripts and the gamemod are working against each other ,Like they have the same commands or something like that)


hope you cann fix it