• Welcome to Valhalla Legends Archive.
 

Why isn't this working?

Started by OuTLawZGoSu, January 28, 2004, 04:09 PM

Previous topic - Next topic

Spht

Quote from: Myndfyre on January 29, 2004, 09:02 PM
Quote from: DarkMinion on January 29, 2004, 08:08 AM
Never ever ever check a bitmask with =

Well thanks, I'm not a VB programmer, I do C/Java/C#, so I wouldn't know.  It was intended more to point him in the right direction.  :)  When I check bitmasks in C#, I go:


if ( (flags & (int)UserFlags.Squelched) == UserFlags.Squelched)
 // assign squelched icon
else if ( (flags & (int)UserFlags.Moderator) == UserFlags.Moderator)
 // give it the gavel.

etc.

Same concept...