View unanswered posts | View active topics It is currently Sat Aug 02, 2014 4:38 am






Reply to topic  [ 5 posts ] 
Newbee Problem 
Author Message
Rookie

Joined: Mon Aug 11, 2008 9:29 pm
Posts: 2
Post 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


Mon Aug 11, 2008 9:37 pm
Profile
Rookie

Joined: Wed Jul 23, 2008 12:48 am
Posts: 19
Location: Germany
Post 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...


Tue Aug 12, 2008 1:54 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post 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.


Tue Aug 12, 2008 11:09 am
Profile
Rookie

Joined: Mon Aug 11, 2008 9:29 pm
Posts: 2
Post Re: Newbee Problem
Dick,
The Use System Include Files was not checked in the Compiler tab of the preferences.

Thanks for the help.

Jeff


Tue Aug 12, 2008 5:55 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post 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.


Wed Aug 13, 2008 1:13 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.