error for transform.RotateAround

i get this error Assets/scripts/cameraLookScript.js(16,47): BCE0023: No appropriate version of 'UnityEngine.Transform.RotateAround' for the argument list '(UnityEngine.Transform, UnityEngine.Vector3, Object)' was found.

and i have this for code

 static var ysens;
  var playerPos: Transform;
  var ysens2;

  function Update () 
    gameObject.transform.eulerAngles.z = 0;
    ysens2= ysens*Time.deltaTime;

    if(Input.GetAxis("Mouse Y"))
      if(Input.GetAxis("Mouse Y")<0)
        transform.RotateAround(playerPos, Vector3.up, ysens);
      if(Input.GetAxis("Mouse Y")>0)
        transform.RotateAround(playerPos, Vector3.down, -ysens);

Try initializing the ysens2 to 0 at the begining (var ysens2 = 0;).

But, I don't think that'd be the answer... What you have in the transform.RotateAround: is transform, vector3, float... But it needs a vector3, vector3, float...

So you'd have to change playerPos from a Transform (Check up top towards the var), to a Vector3...

Not only this, but the Transform you're using is never given a value... Both of these might/could be problems that I see.

Hope this helped! =)

change the RotateAround argument from playerPos to playerPos.position

(the variable playerPos would be better named playerTransform)

I believe the error is calling the 3rd object a type Object because of the use of the keyword var. It has to infer the type at compile time, which it can, and will determine to be a float because of the deltaTime being a float. ysens is clearly an int but a number with a decimal times an int is going to make the var be of type float. I believe it hits an error with the first argument because there is no matching overload of the function that starts with an argument of type Transform.

in other words, the code should not give you that error when you make the above mentioned change of playerPos to playerPos.position