[ERR] expressions in arguments?

Monkey Forums/Monkey Programming/[ERR] expressions in arguments?

GW_(Posted 2011) [#1]
Is it correct behavior for this to fail compilation?
Local myval%=1
SetColor(myval=1, 0, myval=0)



marksibly(Posted 2011) [#2]
Hi,

myval=1 and myval=0 are expressions of type Bool, and Bool cannot be converted to Float - which is what the arguments of SetColor are.

So yes, it's correct for that to fail.


GW_(Posted 2011) [#3]
Ok, thanks!
Sadly that eliminates a whole class of elegant expressions.
But in the end the targets are worth it.