View Single Post
itimeheke
Junior Member
Join Date: Dec 2010
Old 01-07-2011 , 07:21   Re: [TUT] Bits, Bit-fields, and Bit-wise Operators
Reply With Quote #40

That's because bit shifting starts form zero (1 << 0) but player id's from one. This (id & 31) puts this first bit in use by assigning player 32 data to first bit, cause (32 & 31) = 0. Otherwise, player 32's bit bill not be set, cause you're out of memory range(amx variables are limited to 32bit), and by using (1 << 32) you're actually trying to set bit 33, witch will not work. Hope you got it;)
itimeheke is offline