#7

How did you defined MAX_GANGS?
Has every teritory valid owner?
Doesn't any gang GangColor set to 7 or above, especially 10? ("index 10 past array upper bound 6" - so try to check / delete / set GangColor for GangInfo to 0, I'm almost sure, that "array upper bound 6" refers to Colors[]).

If everything seems to be ok, last chance can be trying to validate by printf.
Код:
                printf("Loop number %d, teritory ID: %d",i,Teritories[ i ][ ID ]);
                printf("owner: %d; owner's colorid: %d", GangInfo[ Teritories[ i ][ owner ] ][ GangColor ]);
                printf("color: %x",Color[GangInfo[ Teritories[ i ][ owner ] ][ GangColor ]]);
		GangZoneShowForPlayer( playerid, Teritories[ i ][ ID ], Colors[ GangInfo[ Teritories[ i ][ owner ] ][ GangColor ] ] );
Imo this should crash after owner and owner's colorid, it would be easier to check is this valid value.
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)