why wont these workin max as they do in b3d ??

BlitzMax Forums/BlitzMax Beginners Area/why wont these workin max as they do in b3d ??

D4NM4N(Posted 2006) [#1]
Function ARGB(R%, G%, B%)
   'Local cres = B + G * 256 + R * 256 * 256
   Local cres%=(b Or (g Shl 8) Or (r Shl 16) Or ($ff000000))
   Return cres
End Function
Function getRed(ARGB%)
   'Local cres = ARGB / (256 * 256) + 256
   Local cres%=(ARGB Shr 16) And $ff
   Return cres
End Function
Function getGreen(ARGB%)
   'Local cres = (ARGB Mod (256 * 256)) / 256 + 256
   Local cres%=(ARGB Shr 8) And $ff
   Return cres
End Function
Function getBlue(ARGB%)
   'Local cres = (ARGB Mod (256 * 256)) Mod 256 + 256
   Local cres%=ARGB And $ff
   Return cres
End Function



Brucey(Posted 2006) [#2]
Instead of "or" use | (pipe)
Instead of "and" use &

eg.
Local cres%=ARGB & $ff



D4NM4N(Posted 2006) [#3]
ahhhhhh