Server restarts...
#1

Hi,
I have a big problem. My server stop after a player join him . I can join and other players, but when that player joins the server, the server will stop

What is the reason for this event?
Reply
#2

show us your OnPlayerConnect callback
Reply
#3

I used crashdetect plugin to detect this problem and i get this:
Code:
[09:16:42]:
[09:16:42]: --- crashdetect 3.6.11.0 loaded
[09:17:54]: Server crash caused by native format() called at address 0x682C in 'gamemodes/RAS.amx'
[09:17:54]: Call stack (most recent call first):
??
Reply
#4

Quote:
Originally Posted by Edvin
View Post
I used crashdetect plugin to detect this problem and i get this:
Code:
[09:16:42]:
[09:16:42]: --- crashdetect 3.6.11.0 loaded
[09:17:54]: Server crash caused by native format() called at address 0x682C in 'gamemodes/RAS.amx'
[09:17:54]: Call stack (most recent call first):
??
Show us your GM
Reply
#5

Quote:
Originally Posted by MathijsS
View Post
Show us your GM
I can't do this :P
I find the problem is on OnPlayerConnect CallBack
Code:
public OnPlayerConnect( playerid )
{
    new string[ 300 ], file[ 256 ], tmp3[ 50 ], iTDString[ 256 ];
    PreloadAnimLib( playerid, "DANCING" );
	GetPlayerIp( playerid, tmp3, 50 );
    foreach(Player, i )
    if ( gNameTags[ i ] == 0 )
    ShowPlayerNameTagForPlayer( i, playerid, 0 );
    
	GPSTimer[ playerid ] 					= 0;
	Vup[ playerid ] 						= 0;
	JumpSize[ playerid ]	 				= 0;
	VupKey[ playerid ] 						= 0;
	Posaved[ playerid ] 					= 0;
	firstspawn[ playerid ] 					= 1;
	gNameTags[ playerid ] 					= 1;
	InEvent[ playerid ] 					= 0;
	g_GotInvitedToDuel[ playerid ] 			= 0;
	g_HasInvitedToDuel[ playerid ] 			= 0;
	g_IsPlayerDueling[ playerid ]  			= 0;
	HaveGPS[ playerid ] 					= false;
	PlayerInfo[ playerid ][ Deaths ] 		= 0;
	PlayerInfo[ playerid ][ Kills ] 		= 0;
	PlayerInfo[ playerid ][ Jailed ] 		= 0;
	PlayerInfo[ playerid ][ Frozen ] 		= 0;
	PlayerInfo[ playerid ][ Level ] 		= 0;
	PlayerInfo[ playerid ][ SAdmin ]        = 0;
	PlayerInfo[ playerid ][ pVip ] 			= 0;
	PlayerInfo[ playerid ][ rVip ]          = 0;
	PlayerInfo[ playerid ][ LoggedIn ] 		= 0;
	PlayerInfo[ playerid ][ Registered ] 	= 0;
	PlayerInfo[ playerid ][ God ] 			= 0;
	PlayerInfo[ playerid ][ GodCar ] 		= 0;
	PlayerInfo[ playerid ][ TimesSpawned ] 	= 0;
	PlayerInfo[ playerid ][ Muted ] 		= 0;
	PlayerInfo[ playerid ][ MuteWarnings ] 	= 0;
	PlayerInfo[ playerid ][ Warnings ] 	  	= 0;
	PlayerInfo[ playerid ][ Caps ] 		  	= 0;
	PlayerInfo[ playerid ][ DoorsLocked ] 	= 0;
	PlayerInfo[ playerid ][ pCar ] 		  	= -1;
	for ( new i; i < PING_MAX_EXCEEDS; i++ ) PlayerInfo[ playerid ][ pPing ][ i ] = 0;
	PlayerInfo[ playerid ][ SpamCount ]   	= 0;
	PlayerInfo[ playerid ][ SpamTime ]    	= 0;
	PlayerInfo[ playerid ][ PingCount ]   	= 0;
	PlayerInfo[ playerid ][ PingTime ]    	= 0;
	PlayerInfo[ playerid ][ FailLogin ]   	= 0;
	PlayerInfo[ playerid ][ Coins ] 	  	= 0;
	PlayerInfo[ playerid ][ DeathMatch ]  	= 0;
	PlayerInfo[ playerid ][ RaceScore ]   	= 0;
	PlayerInfo[ playerid ][ Rank ] 		  	= 0;
	PlayerInfo[ playerid ][ P_AntiFall ]    = 0;
	RecentlyRobbed[ playerid ] 				= 0;
	PlayerInfo[ playerid ][ hours ]         = 0;
	PlayerInfo[ playerid ][ mins ]          = 0;
	PlayerInfo[ playerid ][ secs ]          = 0;
	PlayerInfo[ playerid ][ pMinigame ] 	= 0;
	PlayerInfo[ playerid ][ pMinigameNr ] 	= 0;
	PlayerInfo[ playerid ][ Drugs ]         = 0;
	PlayerInfo[ playerid ][ ConnectTime ] 	= gettime( );
	SpawnInDM[ playerid ] 					= " ";
	DM[ playerid ] 							= 0;
	Reply[ playerid ] 						= 0;
	Planted[ playerid ]                     = 0;
	Bomb[ playerid ] 						= 0;
	SbK[ playerid ] 						= 0;
	Sb[ playerid ] 							= 0;
	Velocity[ playerid ] 					= 0;
	PlayerInDerby[ playerid ] 				= 0;
	DerbyPlaying                            = 0;
	TogglePlayerControllable( playerid, 0 );
	ResetPlayerWeapons( playerid );
	
	if ( ServerInfo[ ConnectMessages ] == 1 )
	{
	    new str[ 256 ], pAKA[ 256 ];
	    pAKA = dini_Get( "ladmin/config/aka.txt", tmp3 );
		if ( strlen( pAKA ) < 3 ) format( str, sizeof( str ), "*** {33CCFF}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
		else if ( !strcmp( pAKA, PlayerName( playerid ), true ) ) format( str, sizeof( str ), "*** {33CCFF}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
		else format( str, sizeof( str ),"*** {33CCFF}%s(%d) {ACACAC}has joined the server ( AKA: {FFFF00}%s{ACACAC} )", PlayerName( playerid ), playerid, pAKA );

		foreach(Player, i ) if ( playerid != i )
		{
			if ( PlayerInfo[ i ][ Level ] > 2 ) SendClientMessage( i, COLOR_GREY, str );
			else
			{
				format( str, sizeof( str ), "*** {33CCFF}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
                print( "string3" );
				SendClientMessage( i, COLOR_GREY, str );
			}
		}
	}
	if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 )
    {
        new str2[ 256 ];
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, COLOR_GREY, "This name is {FFFF00}BANNED {ACACAC}from this server!" );
        Kick( playerid );
        
		format( str2, sizeof( str2 ), "*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. Reason: {33CCFF}Name banned from server!", PlayerName( playerid ), playerid );
        print( "string4" );
		SendClientMessageToAll( COLOR_GREY, str2 );
		print( str2 );
		SaveToFile( "KickLog", str2 );
    }
    LTempBanCheck( playerid );
	if ( ServerInfo[ NameKick ] == 1 )
	{
		for ( new s = 0; s < BadNameCount; s++ )
		{
  			if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) )
  			{
				SendClientMessage( playerid, COLOR_GREY, "Your name is on our {FFFF00}black list, {ACACAC}you have been kicked." );
				format( string, sizeof( string ), "*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
                print( "string5" );
				SendClientMessageToAll( COLOR_GREY, string );
				print( string );
				SaveToFile( "KickLog", string );  Kick( playerid );
				return 1;
			}
		}
	}
	if ( ServerInfo[ PartNameKick ] == 1 )
	{
        for ( new s = 0; s < BadPartNameCount; s++ )
		{
			new pos;
			while ( ( pos = strfind( PlayerName( playerid ), BadPartNames[ s ], true ) ) != -1 ) for ( new i = pos, j = pos + strlen( BadPartNames[ s ] ); i < j; i++ )
			{
				SendClientMessage( playerid, COLOR_GREY, "Your name is not allowed on this server, you have been kicked." );
				format( string, sizeof( string ), "*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
                print( "string6" );
				SendClientMessageToAll( COLOR_GREY, string );  print( string );
				SaveToFile( "KickLog", string );  Kick( playerid );
				return 1;
			}
		}
	}
	if ( ServerInfo[ Locked ] == 1 )
	{
		PlayerInfo[ playerid ][ AllowedIn ] = false;
		SendClientMessage( playerid, COLOR_ULTRARED, "Server is Locked! You have {FFFF00}20 {E60000}seconds to enter the server password before you are kicked!" );
		SendClientMessage( playerid, COLOR_ULTRARED, "Type {FFFFFF}/password [password]" );
		LockKickTimer[ playerid ] = SetTimerEx( "AutoKick", 20000, 0, "i", playerid );
	}
	if ( strlen( dini_Get( "ladmin/config/aka.txt", tmp3 ) ) == 0 ) dini_Set( "ladmin/config/aka.txt", tmp3, PlayerName( playerid ) );
 	else
	{
	    if ( strfind( dini_Get( "ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ), true ) == -1 )
		{
		    format( string, sizeof( string ),"%s,%s", dini_Get( "ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ) );
            print( "string7" );
			dini_Set( "ladmin/config/aka.txt", tmp3, string );
		}
	}
	
	SendClientMessage( playerid, -1, " " );
	SendClientMessage( playerid, -1, " " );
	SendClientMessage( playerid, -1, " " );
	SendClientMessage( playerid, -1, " " );
	SendClientMessage( playerid, -1, " " );
	SendClientMessage( playerid, COLOR_GREY, "Welcome to {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt {ACACAC}for more help please type {FF9900}/help{FFFFFF}!" );
	SendClientMessage( playerid, COLOR_GREY, "Use {FF9900}/rules {ACACAC}for view the server regulations." );
	SendClientMessage( playerid, COLOR_GREY, "Type {FF9900}/cmds {ACACAC}for all commands !" );
	SendClientMessage( playerid, COLOR_GREY, "Use {FF9900}/ro {ACACAC}if you are romвn or {FF9900}/eng {ACACAC}if you are English." );
	SendClientMessage( playerid, COLOR_GREY, "Type {FF9900}/teles {ACACAC}to see teleportation on the server." );
	SendClientMessage( playerid, COLOR_GREY, "If you need a vehicle type {FF9900}/V {ACACAC}and if you want to tune cars write {FF9900}/tune" );
	SendClientMessage( playerid, COLOR_GREY, "Visit {FF9900}www.vips-zone.ro {ACACAC}for view the server forum!" );
	
	TextDrawShowForPlayer( playerid, NoneTextdraw );
	TextDrawShowForPlayer( playerid, Steam1 );
	TextDrawShowForPlayer( playerid, Steam2 );
	TextDrawShowForPlayer( playerid, Steam3 );
	TextDrawShowForPlayer( playerid, HelpT );
	TextDrawShowForPlayer( playerid, RulesT );
	TextDrawShowForPlayer( playerid, CmdsT );
	TextDrawShowForPlayer( playerid, TelesT );
	TextDrawShowForPlayer( playerid, OnConnectSteaua1 );
	TextDrawShowForPlayer( playerid, OnConnectSteaua2 );
	TextDrawShowForPlayer( playerid, OnConnectForum );
	
	if ( !udb_Exists( PlayerName2( playerid ) ) )
	{
	 	new rstr[ 256 ];
		format( rstr, sizeof( rstr ), "{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
        print( "string8" );
		ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_PASSWORD, "{E60000}Register", rstr, "Register", "" );
	}
	else
	{
	    PlayerInfo[ playerid ][ Registered ] = 1;

		format( file, sizeof( file ), "/ladmin/users/%s.sav", udb_encode( PlayerName( playerid ) ) );
        print( "string9" );
		new tmp2[ 256 ]; tmp2 = dini_Get( file, "ip" );
		if ( ( !strcmp( tmp3, tmp2, true ) ) && ( ServerInfo[ AutoLogin ] == 1 ) )
		{
		    TextDrawShowForPlayer( playerid, WelcomeBack );
		    TextDrawShowForPlayer( playerid, ONS );
		    TextDrawShowForPlayer( playerid, RAS );
		    TextDrawShowForPlayer( playerid, backround );
		    TextDrawShowForPlayer( playerid, LoggedInTD );
			TextDrawShowForPlayer( playerid, ClickMessage );
			LoginPlayer( playerid );
			if ( PlayerInfo[ playerid ][ Level ] > 0 )
			{
			    new P1RVIP[ 4 ], P1SAdmin[ 4 ];
			    if ( PlayerInfo[ playerid ][ rVip ] == 1 ) P1RVIP = "Yes"; else P1RVIP = "No";
			    if ( PlayerInfo[ playerid ][ SAdmin ] == 1 ) P1SAdmin = "Yes"; else P1SAdmin = "No";
			    TextDrawShowForPlayer( playerid, NumeTD );
			    format( iTDString, sizeof( iTDString ), "%s", PlayerName( playerid ) );
                print( "string10" );
				TextDrawSetString( NumeTD, iTDString );
				TextDrawShowForPlayer( playerid, RVIPP );
				format( iTDString, sizeof( iTDString ), "- ~h~~g~R.VIP: ~w~%s", P1RVIP );
                print( "string11" );
				TextDrawSetString( RVIPP, iTDString );
				TextDrawShowForPlayer( playerid, AdminLevel );
				format( iTDString, sizeof( iTDString ), "- ~h~~g~Admin level: ~w~%d", PlayerInfo[ playerid ][ Level ] );
                print( "string12" );
				TextDrawSetString( AdminLevel, iTDString );
				TextDrawShowForPlayer( playerid, VipLevel );
				format( iTDString, sizeof( iTDString ), "- ~h~~g~V.I.P level: ~w~%d", PlayerInfo[ playerid ][ pVip ] );
                print( "string13" );
				TextDrawSetString( VipLevel, iTDString );
				TextDrawShowForPlayer( playerid, SAdmins );
				format( iTDString, sizeof( iTDString ), "- ~h~~g~SAdmin: ~w~%s", P1SAdmin );
                print( "string14" );
				TextDrawSetString( SAdmins, iTDString );
       		}
	   		else
			{
			    TextDrawShowForPlayer( playerid, NumeTD );
			    format( iTDString, sizeof( iTDString ), "%s", PlayerName( playerid ) );
                print( "string15" );
				TextDrawSetString( NumeTD, iTDString );
				TextDrawShowForPlayer( playerid, RVIPP );
				TextDrawSetString( RVIPP, "- ~h~~g~R.VIP: ~w~No" );
				TextDrawShowForPlayer( playerid, AdminLevel );
				TextDrawSetString( AdminLevel, "- ~h~~g~Admin level: ~w~0" );
				TextDrawShowForPlayer( playerid, VipLevel );
				TextDrawSetString( VipLevel, "- ~h~~g~V.I.P level: ~w~0" );
				TextDrawShowForPlayer( playerid, SAdmins );
				TextDrawSetString( SAdmins, "- ~h~~g~SAdmin: ~w~No" );
			}
  	    }
 		else
 		{
 		    new rstr[ 256 ];
			format( rstr, sizeof( rstr ), "{FFFFFF}Welcome back {FFFF00}%s{FFFFFF}, on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt {FFFFFF}server.\n\n{FFFFFF}Please {E60000}login {FFFFFF}your account, with your password:", PlayerName( playerid ) );
            print( "string16" );
			ShowPlayerDialog( playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "Login your account", rstr, "Login", "" );
		}
	}
    return 1;
}
I put prints ... when that player connects it only print the "string3" and after server crashes...
And if connect I is printed:
string3
string9
string10
string11
string12
string13
string14
Reply
#6

BUMP UP!

Sorry guys, but i need to fix this problem... any sugestions about this problem?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)