Mathf.Clamp not working, no appropiate version of "UnityEngine.Mathf.Clamp"

i want to clamp/ limit my rotation

var maxRot : float = 40;
var minRot : float = -25;
function Update(){
rotation = Mathf.Clamp (rotation,maxRot,minRot);


Your code above will not compile or produce the specified error because ‘rotation’ is undefined. If ‘rotation’ was really ‘transform.rotation’ then you would get this error since Transform.rotation is a quaternion (not a float) and Mathf.Clamp() takes three floating point values. Rotations and limiting rotation can be tricky. I suggest searching the list for some past answers on the subject.