Closed F2Andy closed 8 years ago
It's a limitation of the current script runner. The return type of "Eval" is not a boolean - it can't know what the return type is until it evaluates the expression. It might work if you use
Eval("true") = true
though maybe.
On Tue, 24 Nov 2015 at 14:22 F2Andy notifications@github.com wrote:
This works fine: msg (Eval ("true"))
This generates an error: if (Eval ("true")) { msg("yes") } -> Error running script: Error compiling expression 'Eval ("true")': RootExpressionElement: Cannot convert type 'Object' to expression result of 'Boolean'
— Reply to this email directly or view it on GitHub https://github.com/textadventures/quest/issues/820.
This works fine:
msg (Eval ("true"))
This generates an error:
if (Eval ("true")) {
msg("yes")
}
-> Error running script: Error compiling expression 'Eval ("true")': RootExpressionElement: Cannot convert type 'Object' to expression result of 'Boolean'