No op overloading. You'll have to create a function instead. No function overloading either, so you'll have to create a unique name for functions accepting different parameters, or get creative.
Function MakeColors(Red:int, Green:Int = -1, Blue:Int = -1)
If Green = -1 then
Blue = Red & $FF
Green = (Red Shr 8) & $FF
Red = (Red Shr 16) & $FF
End If
DoStuff()
End Function
'You can now call MakeColors with Red, Green, Blue
MakeColors($0F, $FE, $10)
'Or you can use an Int with RGB combined
MakeColors($0FFE10)
|