Asked — Edited

Variable $Mmay,Mmaz, Or Mmax Not Defined ?

In the MMA7544 window if wrote balance script with (if )statement example: if ($mmay>90) press run script it stops here saying Variable $mmay not defined

Whats really weird is that the whole script ran fine till I saved my file and reopened it an hour later. This is a bug right?

this is latest version software 3/7


Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!


Sorry, can you try again to explain the issue? I do not understand.


@cliffordkoperski Although you don't have to declare variables in ARC, you have to assign them an initial value before you use them in a comparison... So if this is the first instance of where ARC is seeing the variable $mmay " if ($mmay>90) " it will fail because no value has been set to $mmay previously... Are you sure the control is connected to the MMA7455 and is saving data to your variables before you run your scripts? Also make sure the set variables box is checked within the control itself....

United Kingdom

Add the variable watcher. Only when the variables are added will scripts which refer to them work.

If the control assigns the variables you must use the control before the variables are created, this is not done on project open.

To avoid script errors you can define variables in an init script however until the control is used they will remain whatever set in the init script (it just wont error in the script).


Sorry DJ don't want to be confusing and waste any ones time. just reporting what I noticed

  1. mma7455 responds i write script and robot balances
  2. I save file and close ARC
  3. open file later, confirm mma senor reacts to movement, select run script
  4. script stops on IF saying (variable $mmay not declared)


I closed and re opened ARC a few times and then it ran through script fine:)

only guess to problem:

the set variable check box would not stay selected. Also run script timer still never stays selected for me once out of edit window.

Thanks for responses they helped, I'll share my biped balance script with community once smoothed out.