Vice City Multiplayer

General Discussion => Support => Topic started by: killvn1 on January 22, 2013, 05:50:45 pm

Title: I Have No Idea Why My Server Crash ???
Post by: killvn1 on January 22, 2013, 05:50:45 pm
I develop my server from Gup 1.16 . I Complier file pwn to amx with No error  ??? . But sometimes my server crash . Not always but sometime ... when player are playing ... The server suddenly crash .
I have No Idea why .

Is there any way to know exactly what is the error with my server ? Because my server now have more 20.000 sentence of scripts ! I Will goto crazy if i check each line  :-\
Title: Re: I Have No Idea Why My Server Crash ???
Post by: sseebbyy on January 22, 2013, 05:55:38 pm
Sometimes some noob players can crash your server without a reason.

But sometimes the script makes your server to crash.

I think you should make an "Anti-Crash System" .

How to do that ?
You have to print in the RCON Console everything !

Everything ?
Yes ! Print in the RCON Console everything:
     - when a player join.
     - when a player enter in a vehicle
     - when a player request class
     - when a timer set by you is called (like an "pay-day" or everything)
     - etc.

Code: [Select]
To print a text in RCON Console, use "printf()" function.
http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/Printf

I hope you got it. Good Luck !
Title: Re: I Have No Idea Why My Server Crash ???
Post by: killvn1 on January 23, 2013, 08:37:29 am
Yeah I know about "printf()" function ... But please explain more clearly .
How can the "printf()" function show me the error of my scripts ?

Thank you for answer !
Title: Re: I Have No Idea Why My Server Crash ???
Post by: sseebbyy on January 23, 2013, 03:54:21 pm
It will not show you the errors, but will tell you when the server stop.

For example, a player spawned. You have to use "printf()" to create a text by script sent to the console that shows that player spawned.

Code: [Select]
OnPlayerSpawn(playerid, classid)
{
     new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1]; //Use this if you don't have it already created.
     GetPlayerName(playerid,gPlayers[playerid],MAX_PLAYER_NAME); //Use this if you don't have it already created.

     printf("** pm >> [%d] %s spawned.",playerid,gPlayers[playerid]);
     return 1;
}

And when the server will get crash, you have to check the last message printed in console. In my example I used OnPlayerSpawn (http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/OnPlayerSpawn) , so , if the server get crash and the last message was that "** pm >> [1] killvn1 spawned."  , you have to check the OnPlayerSpawn to see if there is any script mistake.
Title: Re: I Have No Idea Why My Server Crash ???
Post by: killvn1 on January 23, 2013, 04:10:15 pm
Got it ... it's will take a little time but worth to do :))
Title: Re: I Have No Idea Why My Server Crash ???
Post by: aledark24 on January 27, 2013, 03:36:39 am
i have idea... i know gups and not contain anti-nickname example if the player use  #*-+(+&!:!:;
and register the server crashed
and if use !myprops server is crashed again
 ;D