here is a little test plugin
Code:
#include <amxmodx>
enum data
{
Float:myfloat
}
new dat[data]
public plugin_init( )
{
register_plugin("test_enum_floats", "0.1", "White Panther")
server_print("myfloat %f", dat[myfloat])
dat[myfloat] = 2.0
server_print("myfloat %f", dat[myfloat])
dat[myfloat] += 2.0
server_print("myfloat %f", dat[myfloat])
dat[myfloat] = 6.0
server_print("myfloat %f", dat[myfloat])
}
i get these warnings
Code:
test.sma(15 -- 16) : warning 213: tag mismatch
test.sma(19 -- 20) : warning 213: tag mismatch
so each assignment ( = ) is a tag mismatch
where additions ( += ) work fine
Code:
dat[myfloat] = _:2.0
server_print("myfloat %f", dat[myfloat])
dat[myfloat] += 2.0
server_print("myfloat %f", dat[myfloat])
dat[myfloat] = _:6.0
this does solve the warnings but it should work without it too
using this plugin( same as above only adjusted ), tested with SMALL compiler v2.7.3 and PAWN compiler v3.0.3367 + v3.2.3599 and there are no tag mismatches
Code:
#include <float>
enum data
{
Float:myfloat,
}
new dat[data]
main( )
{
printf("myfloat %f\n", dat[myfloat])
dat[myfloat] = 2.0
printf("myfloat %f\n", float:dat[myfloat])
dat[myfloat] += 2.0
printf("myfloat %f\n", dat[myfloat])
dat[myfloat] = 6.0
server_print("myfloat %f", dat[myfloat])
}
PS:
plugins do work fine with these tag mismatches
it is only disturbing, especially when you want to release a plugin using this kind of code
__________________