Using the detach command

I want use the detach command to temporarily detach a servo motor. If I use the detach command in the same way I used the attach command ( myservo1.detach(9); ) I get "no matching function to 'Servo::detach(int)' "

Grateful if anyone could point out what I am doing wrong. Thanks in advance.

The Servo instance already know which pin it is attached to, when you want to detach it. You really don't need to tell it which pin to detach from.

Thank you so much for your quick reply. Solved the problem. Thanks again.