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

Need help Debugging
http://www.robotc.net/forums/viewtopic.php?f=11&t=10417
Page 1 of 1

Author:  Combined IQ [ Fri Jan 30, 2015 7:00 pm ]
Post subject:  Need help Debugging

void pre_auton()
{
// Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
// Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
bStopTasksBetweenModes = true;

int var1;

void function1(int var1); error message = **Error**:Functions must be defined at main scope level
{
motor[port*] = 127;
motor[port*] = 127;
wait1Msec(***);
motor[port*] = 0;
motor[port*] = 0;
}

string var2;

void function2(string var2); error message = **Error**:Functions must be defined at main scope level
{
if(var2== "open")
{
motor[port*] = 127;
wait1Msec(***);
motor[port*] = 0;
}
else if(var2== "close")
{
motor[port*] = 127;
wait1Msec(***);
motor[port*] = 0;
}
}

}
Can someone please tell me what I am doing wrong. I can't figure out myself.

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