#4

Well, i compiled with -d3 and nothing happened.
But when i compiled with Desaints prints:

Код:
public OnPlayerSpawn( playerid )
{
        new ServerHour, ServerMinute, ServerSecond;
	gettime( ServerHour, ServerMinute, ServerSecond );
	
        print("OnPlayerSpawn was called");
	SetupPlayerForGang( playerid, PlayerInfo[ playerid ][ GangID ] );
	Attach3DTextLabelToPlayer( PlayerState[ playerid ], playerid, 0.0, 0.0, 0.5 );
        ShowZonesForPlayer( playerid );
        HideClassTD( playerid );
	God_Mode_Verify( playerid );
        SetPlayerInterior( playerid, 0 );
	SetPlayerSpecialAction( playerid, 0 );
	SetPlayerTime( playerid, ServerHour, 0 );
	SetPlayerVirtualWorld( playerid, 0 );
        print("First breakpoint");
 	CSpeedStats[ playerid ] = 1;
 	HideIntroTextdraws( playerid );
        Jail_EvadeCheck( playerid );
	Freeze_EvadeCheck( playerid );
	CheckDMInfo( playerid );
        print("Second breakpoint");
	
	PlayerInfo[ playerid ][ InDerby ] = 0;
	if( PlayerInfo[ playerid ][ UseSkin ] == 1 )
		SetPlayerSkin( playerid, PlayerInfo[ playerid ][ FavSkin ] );
		
        print("Third breakpoint");
        if( PlayerInfo[ playerid ][ HideTDS ] == 0 )
		ShowSpawnTextdraws( playerid );
		
        print("Fourth breakpoint");
        if( PlayerInfo[ playerid ][ InMG ][ 0 ] == 1 )
    	        SetPlayerPos( playerid, - 786.646484, 2300.745849, 66.580314 );
    	
        print("End of OnPlayerSpawn");
    return 1;
}
he stopped at ShowZonesForPlayer because other functions below doesn't respond.

Console:
[22:37:35] OnPlayerSpawn was called
[22:37:35] [debug] Run time error 4: "Array index out of bounds"
[22:37:35] [debug] Accessing element at index 10 past array upper bound 6
[22:37:35] [debug] AMX backtrace:
[22:37:35] [debug] #0 000903e4 in ?? (0) from ISF.amx

and that's all what show's to me in console.
if i use -d3 nothing happen in console. ( in addition ).

That's showzonesforplayer stock:
Код:
stock ShowZonesForPlayer( playerid )
{
	for( new i = 1; i < MAX_GANGS; i ++ )
 	{
		GangZoneShowForPlayer( playerid, Teritories[ i ][ ID ], Colors[ GangInfo[ Teritories[ i ][ owner ] ][ GangColor ] ] );
	}
	return 1;
}
Colors is defined like:
Код:
new Colors[ ] =
{
	0x9900FFAA, //Gang ID: 1 | Color ID: 0 | Gang Name: The Ballas
	0x55FF00AA, //Gang ID: 2 | Color ID: 1 | Gang Name: Grove Street Families
	0xCC00FFAA, //Gang ID: 3 | Color ID: 2 | Gang Name: The Triads
	0xFF9900AA, //Gang ID: 4 | Color ID: 3 | Gang Name: The Hitmans
	0x00DDFFAA, //Gang ID: 5 | Color ID: 4 | Gang Name: Varios Los Aztecas
	0x0064FFAA, //Gang ID: 6 | Color ID: 5 | Gang Name: San Fierro Rifa
	0xFFFF00AA, //Gang ID: 7 | Color ID: 6 | Gang Name: Los Santos Vagos
};
Teritories is defined like:
Код:
new Teritories[ MAX_GANGS ][ TersData ];
and enum TersData is this:
Код:
enum TersData
{
	Float:minx,
	Float:miny,
	Float:maxx,
	Float:maxy,
	owner,
	ID,
	bool:turfing,
	turfingby
};
I think here is the problem in showzonesforplayer stock, but i don't realize what's the problem..
Maybe Colors it's not ok defined or something, please rep.

EDIT:

I changed ShowZonesForPlayer from stock to function and now in the console show this:
Код:
[23:16:31] OnPlayerSpawn was called
[23:16:31] [debug] Run time error 4: "Array index out of bounds"
[23:16:31] [debug]  Accessing element at index 10 past array upper bound 6
[23:16:31] [debug] AMX backtrace:
[23:16:31] [debug] #0 000903e4 in public ShowZonesForPlayer (0) from ISF.amx
[23:16:31] [debug] #1 0002fad0 in public OnPlayerSpawn (0) from ISF.amx
Reply


Messages In This Thread
Help: Run time error 4: "Array index out of bounds" - by FaLLenGirL - 04.11.2016, 16:42
Re: Help - by Desaint - 04.11.2016, 18:38
Re: Help - by Vince - 04.11.2016, 19:46
Re: Help - by FaLLenGirL - 04.11.2016, 21:13
Re: Help - by FaLLenGirL - 05.11.2016, 07:27
Re: Help: Run time error 4: "Array index out of bounds" - by FaLLenGirL - 05.11.2016, 11:37
Re: Help - by Desaint - 05.11.2016, 16:40
Re: Help - by FaLLenGirL - 05.11.2016, 18:12

Forum Jump:


Users browsing this thread: 2 Guest(s)