
PRO
dbeard
USA
Asked

Prior to ARC, I was able to pass variable among different scripts using EzScript. I can still do that, but I cant pass a variable in JavaScript to and Ezscript. is that something that can be implemented?
Related Hardware EZ-Robot JD Humanoid
Retrieves the value from the Arc’s global variable storage. These are variables that are published by skill controls, such as the Camera, Auto Position, Speech Recognition, etc..
{variableName} - The name of the global variable as a string
{default value} [Optional] If specified, this value is returned if the global variable doesn’t exist.
{return} The value of the global variable
Example:
// Get the current direction the robot is moving
var direction = getVar($Direction);
// Get the value of $test, and if it doesn’t exist return false
var testVar = getVar($test, false);
setVar( variableName, value )
Sets the value from of Arc’s global variable storage. This allows the variable to be available to other controls or other scripts by using getVar().
{variableName} - The name of the global variable as a string
{value} The value that you wish to store in the global variable
{return} The value of the global variable
Example:
// Set a value of 5 to be accessible by other controls
setVar($MyValue, 5);
varExists( variableName )
Check if the global variable exists.
{variableName} - The name of the global variable as a string
{return} true/false Boolean if the variable exists
Example:
// print if the variable exists
print(varExists($MyValue));
So it worked, it set the variable, I can see it in the variable watcher. But my ez script doesn't see that the variable has a value. This script was wrote in a couple of versions before ARC. Does that matter?
Javascript set the variable..
Code:
EZ-Script print the contents of the variable
Code:
but I found it and marked this resolved.
Thanks for the help, good night.