View unanswered posts | View active topics It is currently Sat Jun 23, 2018 7:57 pm






Reply to topic  [ 5 posts ] 
Green highlighted line of code? 
Author Message
Rookie

Joined: Wed Dec 02, 2015 11:18 am
Posts: 3
Post Green highlighted line of code?
When running a program, RobotC gets "stuck" on one line of command with a green arrow and green highlighting of the command on the line. No information is given at the bottom as to why. The program will not run past that point, or run at all when that command is highlighted. I've copied and pasted the program in new files, and same thing. What's happening?


Wed Dec 02, 2015 11:23 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Green highlighted line of code?
We'd need to see the code in order to determine what the cause of the issue is; it's most likely being caused by something holding the program flow, such as a loop or a blocking command. Please post your code using the [code] tags (and let us know which line specifically is encountering the issue), and we'll be more than happy to take a look at it for you.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Thu Dec 03, 2015 10:24 am
Profile
Rookie

Joined: Wed Dec 02, 2015 11:18 am
Posts: 3
Post Re: Green highlighted line of code?
The program freezes up on this program with startMotor(port6, 32); However, all of my students are having this issue in different places in their programs. I was thinking it is an issue with the software, or how we have it configured, or how we are running the program.

task main()
{
robotType(recbot); // We are using the recbot.

startMotor(port6, -32); // Set motor port 6 to speed -32.
untilPotentiometerLessThan(560); // Wait until the potentiometer reads a value LESS than 560.
stopMotor(port6); // Stop motor port 6.

waitInMilliseconds(1000); // Wait 1.0 seconds.

startMotor(port6, 32); // Set motor port 6 to speed 32.
untilPotentiometerGreaterThan(1000); // Wait until the potentiometer reads a value GREATER than 1000.
stopMotor(port6); // Stop motor port 6.
}


Thu Dec 03, 2015 11:45 am
Profile
Rookie

Joined: Sat Nov 29, 2014 4:51 am
Posts: 11
Post Re: Green highlighted line of code?
I have never used this sort of code however try putting robotType(recbot); above task main(){.

I hope this solves the problem.

Asim


Thu Dec 03, 2015 3:51 pm
Profile
Rookie

Joined: Wed Dec 02, 2015 11:18 am
Posts: 3
Post Re: Green highlighted line of code?
Thanks, but I removed that line of code and manually input the motors and sensors. Still freezing with a green highlight and arrow, not allowing the code to run.


Fri Dec 04, 2015 4:44 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

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.