19.03.2013, 13:51
Hi there. I'm debugging some stuff, and I'm using bitflags to speed up the process. Take a look:
Well, nope, this returns me 8. Now I've tried
Cool, it works, but I don't want to rewrite it each time I use a flag.
Is there some magic bitoperator which will return me 1 if flag is present and 0 if not? (I'm not talking about bool, but integer/tagless number)
#e: nope, the second method isn't even supposed to work
pawn Код:
new test = 8, Float:b = 79.5;
new a = (test & 8);
pawn Код:
new a = _:(test & 8 > 0);
pawn Код:
new a = (test & 8 % 2);
#e: nope, the second method isn't even supposed to work