Asked
I have tried to run both ARC 4.3 and ARC 4.5 with scripts from my previous Synthiam software. I receive an error code that identifys a LOOP LABEL as not identified. I have reidentified the LOOP and still indicates an error. I have performed multiple EZB4 resets and removed/reinstalled above software versions to include a computer retart. I am using widows 10 All scripts operated beautifully until I updated this morning. I tried ARC 2 and problem remains. Any help? I'm desparate. Jack
Related Hardware EZ-B v4
If you post code, I can help
Thankyou DJ. I have multiple scripts that normally run. This is one of them. I have found that if I open the script up, it gets "corrupted" and sends an error code. Of the scripts that I did not open since the revision download, they run fine. The above code error message is LoopStart "undefined". Jack
Unfortunately, that would never have run in any JavaScript environment. The reason is the label needs to be directly before a loop. I believe the confusion you have is moving from EZ-Script to JavaScript and misinterpreting the label: functionality. That's easy to do because EZ-Script was terrible
A label: is defined in JavaScript quite differently, see here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label
And more specifically, someone attempting to use it in the similar fashion and realizing the label: needs to be applied directly before a looping statement, here: https://stackoverflow.com/questions/6393648/why-is-this-labeled-javascript-continue-not-working
Here is your code re-written. Keep in mind, as the code comment says, DEVIATION_LEFT is always false. So the IF condition will never be met.
Perhaps if you're communicating with other controls, you'd want DEVIATION_LEFT to be public across the entire project. In that case, use getVar() and setVar(). Such as....
All my scripts are in blockly. They do not run. This version of ARC does not run my Blockly Scripts. What am I to do? Jack
Don't use goto/label, as per the manual for JavaScript states. Unless you're using it for the correct intended purpose, which is outlined in the JavaScript manuals.
The solution would be to use the Loop Forever block, which produces while (true) loop
On this script an error msg "unble to get"(ADC 7). It is connected to the EZB4. I have tried recoding it using Blockly from this current ARC. My scripts ran perfectly earlier this morning before the download. Does a previous version exist that I could use? I would say that the last update I did was 3-6m ago. I tried ARC 4.2 with the same results. Thanks Jack
There indeed seems to be a naming mismatch between the Blockly and JavaScript using ADC.get and ADC.getADC. I'll fix that for the next release
. There will be a new Beta release candidate this evening. I recommend switching to that channel
Many Many Thanks. Jack