23.09.2010, 16:09
Took some time to make this awesome system save in my mind, I'm still wondering about this: What is the correct usage for binary in pawn, when working with variables? Does it work a bit like:
Or is it more like how it's exactly stated:
Any advice would be great, it'd be fun to experiment to get a single variable into a bool of 31 arrays (Yes, I know somebody will be a jerk about that )
pawn Code:
new var = 68;
if(var & 32) print("Var has the 6th bit switched on!");
pawn Code:
new var = 68;
if(var & 100000) print("Var has the 6th bit switched on!");