After a lot of debugging, I pinpointed the problem to the "Round()" function.
Here's an example of totally inconstant results (WeBuilder Plugin script):
Code: Select all
var test1 = Round(11.5); // Returns 12
var test2 = Round(10.5); // Returns 10 << SHOULD BE 11
Script.ClearMessages;
Script.Message(_t(test1));
Script.Message(_t(test2) + " WRONG! Should be 11");

Program used: WeBuilder 2015 v13.2.0.164