ROBOTC.net forums
http://www.robotc.net/forums/

Newbee Problem
http://www.robotc.net/forums/viewtopic.php?f=1&t=676
Page 1 of 1

Author:  jsulmanx [ Mon Aug 11, 2008 9:37 pm ]
Post subject:  Newbee Problem

Hello,
I have a problem that I hope will be very easy to solve. I have installed the ROBOTC IDE, loaded the firmware, connected to the brick and a able to poll the brick with no problems. However, when I attempt to compile the simple program:
task main(){
motor[motorA] = 100;
wait1Msec(3000);
}

I get the following error message
**Error**:Undefined variable 'motorA'. 'short' assumed.
**Error**:Undefined variable 'motor'. 'short' assumed.
**Error**:Undefined procedure 'wait1Msec'.

*Warning*:No body defined for unreferenced procedure prototype 'wait1Msec'

Does anybody have any idea why the compiler cannot see these commands?

Thanks in advance


Jeff Sulman

Author:  zeron [ Tue Aug 12, 2008 1:54 am ]
Post subject:  Re: Newbee Problem

If I just make a new file, copy the lines you posted and paste them into this file, I can compile with no problem. I would suggest to do the same (make a new file and copy the lines from here, not from your previous program). If the error messages persist, I guess it's something with the preferences of the compiler? Maybe uninstall RobotC and try again? No great help, I know. But your code works for me...

Author:  Dick Swan [ Tue Aug 12, 2008 11:09 am ]
Post subject:  Re: Newbee Problem

Figure out how to get into "Expert" user mode. Hint: Use the "User mode" command on the "Windows" menu. This will enable many more commands and settings.

ONce in "Expert" mode, use the "Reset Registry" command on the "Edit" or "View" menu. I can't remember which.

Exit and restart ROBOTC application.

You should be all fixed.

There is a "Preferences" check mark item used to indicate whether the compiler should automatically "#include" the system file "RobotCIntrinsics.c". You should never uncheck this.

Also verify that the file "RobotCIntrinsics.c" is present in the folder "C:\Program Files\Robotics Academy\RobotC for Mindstorms\Include". If not, then your installation is badly corrupted and you should uninstall and re-install.

Author:  jsulmanx [ Tue Aug 12, 2008 5:55 pm ]
Post subject:  Re: Newbee Problem

Dick,
The Use System Include Files was not checked in the Compiler tab of the preferences.

Thanks for the help.

Jeff

Author:  Dick Swan [ Wed Aug 13, 2008 1:13 am ]
Post subject:  Re: Newbee Problem

I'm glad it is now working for you.

Out of the box, I rechecked the code to confirm that the default value for "Use System Includes Header" is "checked". I have no explanation why/how it got changed on your computer.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/