OnPlayerGiveDamageActor Array Index out of bounds


Započeo Sef, Avgust 14, 2018, 00:51:19 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Sef

*

Problem(error/warning): Htio sam da napravim sistem kada igrac ubije aktora koji se nalazi na teritoriji krene zauzimanje medjutim meni ispada neki error u konzoli i ne radi ne znam u cemu je problem pa ako moze ikako pomoc..
Dio skripte:
FUNCTION: OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart){
	for(new id = 0; id < MAX_DILER; id++)
	{
	if(damaged_actorid == DilerSkin[id] && IsValidActor(DilerSkin[id]) && GetWeapon( playerid ) >= 22 && GetWeapon( playerid ) <= 40 )
	{
		new stringic[ 24 ];
        format( stringic, sizeof( stringic ), "0x%s99", org_info[ PlayerInfo[ playerid ][ xClan ] ][ oColor ] );
        new gZone__ID1 = gZone_ID[ playerid ];
		GangZoneFlashForAll( gZoneInfo[ gZone__ID1 ][ gZoneID ], HexToInt( stringic ) ); // liinija 81328 koja izbacuje array index out of bounds
		ApplyActorAnimation(id, "SWEET", "Sweet_injuredloop", 4.1, 1, 0, 0, 1, 0);

		SCM( playerid, NARACRVENA, "ZAPOCEO SI ZAUZIMANJE TERITORIJE." );
		SCM( playerid, NARACRVENA, "Moras ostati ziv sledecih 10 minuta kako bi je osvojio." );
		SCM( playerid, NARACRVENA, "Ne smes se previse udaljiti od mesta zauzimanja, jer ce zauzimanje biti prekinuto.");

		gZoneInfo[ gZone__ID1 ][ gZoneTime ] = 30;

		gZone_ID[ playerid ] = gZone__ID1;
		gZone_Time[ playerid ] = 10;
		gZone_Timer[ playerid ] = SetTimerEx( "ZonaZauzmi", 1000, true, "i", playerid );

		PlayerInfo[ playerid ][ xZauzimanjeVreme ] = 30;

		OrgPoruka( PlayerInfo[ playerid ][ xClan ], 0x95b4a2FF, "[TERITORIJA] Clan vase organizacije pokusava da zauzme tudju teritoriju." );

	}
	}

	return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[debug] Run time error 4: "Array index out of bounds"
[debug]  Attempted to read/write array element at negative index -1
[debug] AMX backtrace:
[debug] #0 0099bef8 in public AC_OnPlayerGiveDamageActor (playerid=0, damaged_actorid=3, Float:amount=140.00000, weaponid=24, bodypart=9) at C:\Users\admin\Desktop\MOD\gamemodes\mod.pwn:81328
[debug] #1 0000172c in public OnPlayerGiveDamageActor (playerid=0, damaged_actorid=3, Float:amount=140.00000, weaponid=24, bodypart=9) at C:\Users\admin\Desktop\MOD\pawno\include\EAF.inc:293

Slika/video ingame problema(obavezno ako je ingame problem): link slike
Poslednja Izmena: Avgust 14, 2018, 10:12:31 PRE PODNE od Bašovski
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”