Disallow retagging enums or using implicit-int as an enum tag.

This commit is contained in:
David Anderson
2014-11-20 19:30:22 -08:00
parent f573bdf784
commit 673ff572c5
4 changed files with 43 additions and 9 deletions
@@ -0,0 +1,23 @@
native Float:float(x);
native Float:FloatMul(Float:oper1, Float:oper2);
stock Float:operator*(Float:oper1, oper2)
{
return FloatMul(oper1, float(oper2));
}
native Float:GetRandomFloat();
enum _:Rocketeer {
bool:bActivated,
iRockets[20]
};
public OnPluginStart()
{
decl Float:fAngles[3];
fAngles[0] = GetRandomFloat() * 360;
fAngles[1] = GetRandomFloat() * 360;
fAngles[2] = GetRandomFloat() * 360;
}
@@ -0,0 +1 @@
(11) : error 169: cannot tag an enum as implicit-int