Coding Error: Expected Expressing

I’m trying to set my motor to a low torque when L1 is released but I’m having some issues because I keep getting an Expected Expression Error here is my code


can someone please help me

I am unsure as to how .released() works since I get a lot of errors when I try to use it.

This code segment should give you the same result that you are looking for:

if (Controller1.ButtonL1.pressing())
    {
      do
      {
        wait(5, msec);
      } while (Controller1.ButtonL1.pressing());
      Catapult.setMaxTorque(1, percent);
    }