Code help, i have a comp tmmw

i need help, i wrote a new auton today and it really screwed up my driver control stuff for a reason idk why. the catapult auto turns back when limit switch isnt pressed. but, my shooting button (overwrite) on R1, doesnt, well, spin the motor anymore, it acts as if nothing is happening, the wire is fine, the port is fine, and the motor is fine, so it has to be the code. and its spinning the right way so its not like its turning against the ratchet.
driver control stuff →

// cata automation and release code

    catalimit.pressed(catalimitpressed);  // if catapult is depressing the limit switch, stop spinning cata motor. keeps it in same loading pos everytime, more trust worthy than an encoder value imo
    catalimit.released(catalimitnotpressed); // if cata not depressing limit switch, spin motor til it is... reference ^^

    Controller1.ButtonR1.pressed(overwrite); // make it so we can actually shoot the cata 
 //cata automation and release code end

stuff outside driver control →

void overwrite(){
  cata.setVelocity(100, percent);
  cata.spinFor(reverse, 270, degrees);
}                                                                                                                                                                                                                                                                                                                                                                                                                                //nice//

void catalimitpressed(){

void catalimitnotpressed(){
  cata.setVelocity(100, percent);

where is all this code, not inside a while loop I hope.
ideally, event registration should only happen once in the main function.