"Manual" Autonomous?

We were trying to find a way to program the Robot Cotroller so that when any of 2 inputs receive a signal, it will leave the autonomous code and enter a ‘maual’ autonomous code. The manual autonomous code would work based on 2 if statements that loop back to the other. The if statements would either say left or right and default forward until any other command or until our timer value ran out. Our code in the attached file, only makes the motors pulse for some other direction or go to one and continue straight without any further response. Any problems with our coding? Also does anyone know an easier way of accomplishing the same tasks?

A copy of our code is attached.
Thanks for the help! Team 2348!

manual_autonomous.txt (1.53 KB)

manual_autonomous.txt (1.53 KB)

 if (ButtonPressed = TRUE) 

should be if (ButtonPressed =***=*** TRUE)

got to love the equal and semicolons