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
Use the latest build from the beta channel: https://synthiam.com/Products/Releases/ARC-Beta-2020-04-06-00-19325
I have tried ARC 4.6. I have been able to run my one script using ADC7. Thankyou. However, the rest of my scripts have multiple GOTO in Blockly. These do not lend themselves to FOREVER Looping. These scripts all error with Label not defined.
Does latest ARC support Blockly?
I'm really stuck here. My project of 3yrs is now bricked because this latest version will not run my scripting. All 11 scripts were functioning beautifully together this morning before the update.
Is it possible to obtain a previous version so that I may continue my work until your Blockly issues get sorted out? Thankyou very much, Jack
Replace the GOTO with LOOP FOREVER. GOTO is not a supported in JavaScript. I provided examples earlier in this thread for ya
Ok Thanks. I'll set to reworking my Blockly scripts by removing my GOTO commands. Jack
Hi DJ One more question. You provided an example of using a Variable globally across the entire project. This was done in JavaScript. Can you provide an example in Blockly? I did this often in Blockly with the past ARC revision but cannot seem to get it to work now. Thank you Jack
update to this beta build from the beta channel: https://synthiam.com/Products/ARC/Releases/ARC-Beta-2020-04-07-00-19328
To make a JavaScript or Blockly variable public, put a $ (dollar sign) in front
OK thank you DJ. I was able now to control variables globally. I downloaded the latest beta. I have reviewed the link that you provided previously:
However I cannot make sense in blockly. Nothing works for me. Could I impose for a simple example in Blockly of LABEL, CONTINUE, & BLOCK. Thanks so much. Jack
Stop using the label and continue and use loops instead. Do not use the label because it doesn't seem to apply to your needs.
All you seem to need is are loops. You want code to loop. So use the loop instead of thinking about labels. The examples i provided above have loops.
Here's an example of using public (global) and private variables in a loop...
Notes:
And here's the JavaScript it generates...
Thanks a million, I think I'm back on track. Jack