05.11.2016, 16:40
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.
Imo this should crash after owner and owner's colorid, it would be easier to check is this valid value.
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 ] ] );