SA-MP Forums Archive
warning 213: tag mismatch (cant solve it) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 213: tag mismatch (cant solve it) (/showthread.php?tid=658786)



warning 213: tag mismatch (cant solve it) - JuWo - 12.09.2018

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.


Re: warning 213: tag mismatch (cant solve it) - iLearner - 12.09.2018

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


Re: warning 213: tag mismatch (cant solve it) - UFF - 12.09.2018

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])); 
}



Re: warning 213: tag mismatch (cant solve it) - JuWo - 12.09.2018

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?


Re: warning 213: tag mismatch (cant solve it) - UFF - 12.09.2018

Код:
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


Re: warning 213: tag mismatch (cant solve it) - JuWo - 12.09.2018

Problem is solved, thanks to UFF +repped that guy