Programming instructions
Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Error Messages in ROBOTC Code • 2
Common Error Messages
Error messages will prevent your program from compiling and downloading to your robot.
You must correct any and all error messages in your program before you will be able to
download it to your robot. Also, error messages can have a “ripple” effect; errors at the
beginning of your program can cause subsequent errors in the code. Because of this, it’s
recommended that you correct errors at the beginning of your program rst, recompile your
code, and then correct any remaining errors.
Most error messages are caused by misspelled reserved words and improper syntax. Many
of these mistakes can be avoided by dragging commands from the Function Library into your
ROBOTC programs.
In the example below, the T in task main is capitalized, causing multiple subsequent errors
and warnings to appear in the Errors display screen.
Error Messages in ROBOTC Code
In situations like these, it’s recommended that you try to correct the rst error in your program
before moving on. The rst error message reads “**Error**:Undened variable ‘Task’. ‘short’
assumed.” When the words “Undened variable” appear in the Errors display screen, it indicates
that ROBOTC does not recognize the specied word; the fact that Task is colored black instead of
blue like other ROBOTC reserved words also indicates that ROBOTC does not recognize it.
To correct this error, you should replace the uppercase T with a lowercase t in task, and recompile
your code. The compiler will reevaluate your code and generate a new set of notications.
Go to Reference Links