- Home /
Boo.Lang.Compiler.CompilerError appears when using eval
For my game, I need to execute a code that's generated by a php script. This is how I do it:
var www : WWW = new WWW (urlw);
yield www;
eval(www.text);
The generated code works perfectly because when I copy it from the browser and paste it in the script, it works. When I try with eval, this appears.
CompilationErrorsException: BCE0011: Boo.Lang.Compiler.CompilerError: An error occurred during the execution of the step 'Boo.Lang.Compiler.Steps.EmitAssembly': 'Boolean'. ---> System.ArgumentException: Boolean at Boo.Lang.Compiler.Steps.EmitAssembly.NumericPromotionOpcodeFor (TypeCode typeCode, Boolean checked) [0x00000] in :0
Some guesses on why this might be happening?
Answer by aafasfasdf · Mar 03, 2015 at 07:47 PM
I figured it out. Yield was causing the problem. All I had to change was: var startCode:Function = null; eval(www.text); StartCoroutine(startCode() as IEnumerator);
and inside the code, add: startCode = function () { .... }
Your answer
Follow this Question
Related Questions
Boo.Lang.Compiler.CompilerError appears when using eval 0 Answers
Javascript(Unityscript) returning Boo compiler error 0 Answers
Is there eval() for C#? 2 Answers
I cant open any scripts. 0 Answers