Hello everybody,
I'm currently developing a Dash based on the amazing Job Andreas Dahl has done.
I'm facing a problem with the bite point setting screen where the Java Formula he's written is not working for me.
Basically what it has to do is to read and make the last adjustable value change (it's a decimal number) on a scale from 1 to 10 when the setting is triggered.
Here's the formula:
var bite = $prop('DahlDesign.DDCbitePoint');
if ($prop('DahlDesign.SW1Enabled'))
{
bite = $prop('DahlDesign.SW1bitePoint');
}
var trunc = parseInt(bite, 10);
var result = Math.round(10*(bite-trunc));
return "." + String(result);
What Simhub returns is always "Expression error:Line 33': Unexpected token *" but the formula seems to be working for Mr. Dahl and everybody else is using it.
Any suggestion? Thanks in advance!
Hi, the error may come from another JS script or formula currently running.
Try to stop any dash running and see if the error is still there.
If so, have a look inside the C:\Program Files (x86)\SimHub\JavascriptExtensions folder.
The custom JS scripts are stored there.
See whether the problem persists if you terminate any active dash.