08.01.2015, 21:36
Those are bits operators, show me the code that you're trying to use it.
An example for this:
If you create another var with the value corresponding to 4, and use the OR bit operator like this:
It will join the bits which are enabled.
So, 0100 has the third bit enabled, and 0010 ain't, then it will turn enabled.
The same thing for the second bit.
An example for this:
pawn Код:
//normal 32-bit var, that contains an integer value corresponding to 2
//which means 0010 in binary.
new var = 2; // 0010
pawn Код:
new var2 = 4; //4 = 0100 binary
var2 |= var; // 0100 | 0010 = 0110
So, 0100 has the third bit enabled, and 0010 ain't, then it will turn enabled.
The same thing for the second bit.