I am trying to take a variable from the pre_auton void to the autonomous void. However, it won't let me return the variable. Is there a way to take a value from a variable from the pre_auton void and use it for the autonomous void?
Declare it ahead of time, not inside of pre_auton. If you declare a variable inside a function, it's local to that function and not accessible from elsewhere. So declaring it at a broader scope will let you still change it inside pre_auton and then access it later.
@.4495c. The pre_auton determines the value of the variable so I can't declare it ahead of time
You can use global variables inside functions, too. Or maybe you're confused between declaring it and setting it. Do what @Adam and I are telling you. Declare it ahead outside of and before pre_auton and then set it within pre_auton. It will work.