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

What's wrong with this code?
http://www.robotc.net/forums/viewtopic.php?f=69&t=12226
Page 1 of 1

Author:  muddyboy [ Fri Sep 18, 2015 2:04 pm ]
Post subject:  What's wrong with this code?

Code:
SensorValue(leftEncoder) = 0;
while(SensorValue(leftEncoder) <= 414)
{
motor[port2] = 127;
motor[port3] = -127;
}


**Error**:Undefined variable 'leftEncoder'. 'short' assumed.

Author:  JohnWatson [ Fri Sep 18, 2015 3:53 pm ]
Post subject:  Re: What's wrong with this code?

The most likely cause of this issue is that the leftEncoder is not defined in the Motors and Sensors setup; double check to make sure that the encoder itself is defined properly, and that the alias you've given it exactly matches the name you are using in your code (in this case, "leftEncoder").

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