Help with Java Form...
 
Notifications
Clear all

Help with Java Formula

3 Posts
3 Users
0 Likes
497 Views
(@anrew93)
New Member
Joined: 12 months ago
Posts: 1
Topic starter  

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!

 


   
Quote
(@romainrob)
Honorable Member
Joined: 4 years ago
Posts: 530
 

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.


   
ReplyQuote
(@rermss)
New Member
Joined: 11 months ago
Posts: 2
 

See whether the problem persists if you terminate any active dash.

geometry dash subzero


   
ReplyQuote
Share: