warning 213: tag mismatch (cant solve it)
#1

this warning doesn't make my filterscript work properly anymore.


Код:
 public OnFilterScriptInit() {
	new
	    iTeamTurfs[sizeof(g_Team)]
	;
	for (new i, j = sizeof(g_Turf); i < j; i++) {
		g_Turf[i][turfId] = GangZoneCreate(g_Turf[i][turfPos][0], g_Turf[i][turfPos][1], g_Turf[i][turfPos][2], g_Turf[i][turfPos][3], COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor]), 1.8);
		
		g_Turf[i][turfTimer] = -1;
		
		for (new k, l = sizeof(g_Team); k < l; k++) {
        	g_MembersInTurf[i][k] = 0;
		}
		
		iTeamTurfs[g_Turf[i][turfOwner]]++;
	}

	print(" ");
	print("_________________| Turfwar Script |_________________");
	print("Attempting to initialize ''turfs.amx''...");
	print(" ");
	for (new i, j = sizeof(g_Team); i < j; i++) {
		printf("Loaded %i turfs for team %s", iTeamTurfs[i], g_Team[i][teamName]);
 	}
	print(" ");
	printf("Total %i turfs loaded", sizeof(g_Turf));
	print("_________________________________________________");
	print(" ");
	
	return 1;
}
g_Turf[i][turfId] = GangZoneCreate(g_Turf[i][turfPos][0], g_Turf[i][turfPos][1], g_Turf[i][turfPos][2], g_Turf[i][turfPos][3], COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor]), 1.;

this is the line i get the error from.
Reply
#2

How is turfId defined?
Also what does "COLOR_CHANGE_ALPHA()" return?
Reply
#3

Function : GangZoneCreate(minx, miny, maxx, maxy);

Код:
g_Turf[i][turfId] = GangZoneCreate(g_Turf[i][turfPos][0], g_Turf[i][turfPos][1], g_Turf[i][turfPos][2], g_Turf[i][turfPos][3]);
You can set Zone Color Under OnPlayerSpawn.

Function:
Код:
for (new i, j = sizeof(g_Turf); i < j; i++) 
{
GangZoneShowForPlayer(playerid, g_Turf[i][turfId], COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor])); 
}
Reply
#4

Quote:
Originally Posted by UFF
Посмотреть сообщение
Function : GangZoneCreate(minx, miny, maxx, maxy);

Код:
g_Turf[i][turfId] = GangZoneCreate(g_Turf[i][turfPos][0], g_Turf[i][turfPos][1], g_Turf[i][turfPos][2], g_Turf[i][turfPos][3]);
You can set Zone Color Under OnPlayerSpawn.

Function:
Код:
for (new i, j = sizeof(g_Turf); i < j; i++) 
{
GangZoneShowForPlayer(playerid, g_Turf[i][turfId], COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor])); 
}
ay man you helped me with the first code and the warning got away, but now when i go ingame theres no color on the turfs when ever i deleted the

Код:
 COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor]), 1.8);
from

Код:
  g_Turf[i][turfId] = GangZoneCreate(g_Turf[i][turfPos][0], g_Turf[i][turfPos][1], g_Turf[i][turfPos][2], g_Turf[i][turfPos][3]);
but when i capture it the gang's color flashes and when capturing it stays that color. so how do i get the gang colors to show again whenever i restart the server again without them being full white?
Reply
#5

Код:
for (new i, j = sizeof(g_Turf); i < j; i++) 
{
GangZoneShowForPlayer(playerid,  g_Turf[i][turfId],  COLOR_CHANGE_ALPHA(g_Team[g_Turf[i][turfOwner]][teamColor])); 
}
use this code under First Spawn of player in under OnPlayerSpawn
Reply
#6

Problem is solved, thanks to UFF +repped that guy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)