Heya,
I was trying to remove a flag from a variable in JS, like so:
myNode.powerups &= ~(1 << pup.PowerupID);
but the compiler is giving me this error;
BCE0050: Operator '~' cannot be used with an expression of type 'System.Object'.
However, if I use it like this, it's completely fine:
var pid:int = pup.PowerupID;
myNode.powerups &= ~(1 << pid);
The pup.PowerupID is an int, so why is it giving me the 'Cannot be used with an expression of type Object' error ?