I have found that declaring an array of tagged values, using an enum as the size causes tag mismatch warnings.
Example:
PHP Code:
stock TF2_ClassHealth[TFClassType] = { 0, 125, 125, 200, 175, 150, 300, 175, 125, 125 };
#define TF2_GetClassHealth(%1) TF2_ClassHealth[%1]
//stock Float:TF2_ClassSpeeds[TFClassType] = { 0.0, 400.0, 300.0, 240.0, 280.0, 320.0, 230.0, 300.0, 300.0, 300.0 };
stock Float:TF2_ClassSpeeds[10] = { 0.0, 400.0, 300.0, 240.0, 280.0, 320.0, 230.0, 300.0, 300.0, 300.0 };
#define TF2_GetClassSpeed(%1) TF2_ClassSpeeds[%1]
stock Float:TF2_GetPlayerSpeed(client)
{
if (TF2_IsPlayerSlowed(client))
return 80.0;
else
return TF2_GetClassSpeed(TF2_GetPlayerClass(client));
}
If I used the commented out definition of TF2_ClassSpeeds, using TFClassType as the size, I get a tag mismatch.
However, If I use the constant 10 instead it works fine.
Interestingly, The definition of TFClassHealth works just fine, but being a regular number instead of a Float, has no tag.
This appears to be bug #1936