One of the major features of EyeAuras is its C# script engine which allows to compile, load and execute your code in real-time. It is used in actions, triggers and behavior trees.
Considering there is literally no restrictions on the code you can write, it is not uncommon to make mistakes in script code which could lead to crashes, deadlocks and all other usual problems in programming. I already wrote about this in 7060 changelog.
In this version I've introduced an additional mechanism that will extend your code in attempt to try to mitigate some common mistakes, like not catching Task
exceptions, using Thread.Sleep
instead of EyeAuras-provided Sleep
method which has much-much greater accuracy and is also cancellable or even doing infinite loops while(true){}
instead of while(!cancellationToken.IsCancellationRequested){}
.
All such cases and many other will now be analyzed before compilation and the code will be rewritten. Of course I can try to fix only some percentage of mistakes this way, the major responsibility is still on you, as script developer, to write the working code, but this mechanism will try to make life a little bit easier.
We'll see how it goes and whether this mechanism will prove itself useful. Ideally, you should not even notice it working.
Please report anything strange you may notice!