View Single Post
  #21   Spotlight this post!  
Unread 03-11-2006, 15:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by ghhs_1527
...ive defined "time" and incrimented it the same way for 3 years now and i have had no problem with that at all.
You probably have had problems, but you didn't recognize them as being caused by the way you're initializing your time variable. The way you're doing it, the initialization happens once when the robot powers up. You won't be able to rerun the autonomous mode correctly unless you reset the robot first. Better would be set time to zero explicitly when you enter the User_Autonomous_Code() function, just before the while (autonomous_mode) loop.