PDA

View Full Version : Error : warning 213: tag mismatch


lucasdidur
02-16-2012, 14:57
Hello everybody, I'm having some warnings when compiling the plugin. As I'm learning, I wonder how to fix:

The following error appears:

warning 213: tag mismatch


Erros here

g_hMaxRessurrect = CreateConVar( ...

and

g_hHasRessurrect[i] = 0;



new Float:g_fMaxRessurrect;
new Handle:g_hMaxRessurrect;


g_hMaxRessurrect = CreateConVar( "eh_maxressurrect", "1", "Max de Vezes que pode ser ressucitado no mesmo Round");

g_fMaxRessurrect = GetConVarFloat(g_hMaxRessurrect);



And


new Float:g_hHasRessurrect[ TFMAXPLAYERS + 1];


public Action:ResetRessurrects(Handle:event, const String:name[], bool:dontBroadcast) {

for (new i = 1, iClients = GetClientCount(); i <= iClients; i++) {
g_hHasRessurrect[i] = 0;
}

}



How I can fix this warning?

bl4nk
02-16-2012, 15:34
The first one shouldn't error, as for the second one, use 0.0 instead of 0.

Powerlord
02-16-2012, 15:49
Also, what is TFMAXPLAYERS? I've heard of the MAXPLAYERS constant (which is set by SourceMod) but not TFMAXPLAYERS.

Tylerst
02-16-2012, 16:00
Also, what is TFMAXPLAYERS? I've heard of the MAXPLAYERS constant (which is set by SourceMod) but not TFMAXPLAYERS.

Probably their own define.

The current Sourcemod MAXPLAYERS(Found within clients.inc) is 65 which is the current highest number needed for source games(64 players + sourcetv)

TF2 only has a 32 player limit though, so you could theoretically make a separate define for it(I believe It would need to be 34 to cover everything, 32 players +sourcetv +replay).

lucasdidur
02-16-2012, 16:29
Thanks guys, I understood what the problems were.


On the 1st I changed


... , FCVAR_PLUGIN, true, 1 );

To

... , FCVAR_PLUGIN, true, 1.0 );


And I do not get any more warning message :D

On the 2nd too, I changed, and shows no more warning messages

OBS:

Yes TFMAXPLAYERS I have defined, I forgot to put there


#define TFMAXPLAYERS 34




Thank you guys

Powerlord
02-16-2012, 16:43
Probably their own define.

The current Sourcemod MAXPLAYERS(Found within clients.inc) is 65 which is the current highest number needed for source games(64 players + sourcetv)

TF2 only has a 32 player limit though, so you could theoretically make a separate define for it(I believe It would need to be 34 to cover everything, 32 players +sourcetv +replay).
It used to be that TF2 clients would crash if there were more than 33 players present. I don't know if this was ever fixed.

Meaning that you can't run a 32-player server with both replay and SourceTV present.