Wow, looking at this topic again, I have no idea why I was using ^= HAS_MESSAGE to unset flags rather than &= ^HAS_MESSAGE
Quote:
Originally Posted by FaTony
Not quite sure about the purpose of this. The only reason you would want to stack boolean states into 1 cell is when you are very low on memory and really really care about speed. But in this case, your interface is quite cumbersome. In my plugins, if I want to store a boolean state of client, I just do
PHP Code:
new bool:IsClientBlahBlah[MAXPLAYERS + 1];
|
Well, if you want to pass them to a function or native, then you'd want to use flags like this. Also, it can get kind of messy when you're dealing with a bunch of related booleans. Doesn't help that bool is still a cell, so 4 bytes per entry.
__________________