View unanswered posts | View active topics It is currently Tue Oct 22, 2019 6:45 am






Reply to topic  [ 1 post ] 
Need help Debugging 
Author Message
Rookie

Joined: Fri Jan 30, 2015 6:52 pm
Posts: 1
Post 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.


Fri Jan 30, 2015 7:00 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

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.