Joined: Wed Aug 08, 2012 12:21 am
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 !!*//
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.
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!
Last edited by dan.thomas.dt on Wed Aug 08, 2012 11:32 pm, edited 1 time in total.
Joined: Thu May 24, 2012 12:15 pm
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.
Check out our Blog
! And our Facebook page
Need help? Take a look at our updated help documentation
and the ROBOTC Forums.