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

Natural Language TETRIX w/ undefined variable when compiling
http://robotc.net/forums/viewtopic.php?f=52&t=4740
Page 1 of 1

Author:  dan.thomas.dt [ Wed Aug 08, 2012 12:37 am ]
Post subject:  Natural Language TETRIX w/ undefined variable when compiling

My team is attempting to use Platform Type = Natural Language TETRIX (version 3.08) with Compiler Target = Physical Robot for a simple program and hitting a compile error (**Error**:Undefined variable 'srvo_S1_C2_1'. 'short' assumed). NOTE: I am able to use the same #pragma statements when using the Platform Type = LEGO Mindstorms NXT + TEXTRIX with simple motor commands.

Here is the code:

#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, openLoop)
#pragma config(Servo, srvo_S1_C2_1, servo1, tServoStandard)
#pragma config(Servo, srvo_S1_C2_2, servo2, tServoNone)
#pragma config(Servo, srvo_S1_C2_3, servo3, tServoNone)
#pragma config(Servo, srvo_S1_C2_4, servo4, tServoNone)
#pragma config(Servo, srvo_S1_C2_5, servo5, tServoNone)
#pragma config(Servo, srvo_S1_C2_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{
robotType(ranger); // Use the default REMBOT (change this if you use another robot type).

while(true) // Loop forever.
{
arcadeControl(); // Use Tank Control.
}
}

I would appreciate any thoughts on what we may be doing wrong.

Thank you!

UPDATE: I have tried closing, reopening, and recopying in the code, but I still get the same error. Thanks for looking into this for me!

Author:  JohnWatson [ Wed Aug 08, 2012 12:52 pm ]
Post subject:  Re: Natural Language TETRIX w/ undefined variable when compi

I'll look into this for you, I'm getting the same error.

Update: This is an odd one, I re-opened ROBOTC and copied/pasted the code in again, and the error went away. We are still going to look into this though and find out why it's popping up in the first place.

We'll keep you updated and let you know what we find out/when we have a fix for it.

Author:  tfriez [ Sat Sep 22, 2012 8:30 pm ]
Post subject:  Re: Natural Language TETRIX w/ undefined variable when compi

This issue has been resolved in ROBOTC 3.50 and 3.51.

Thanks!

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