Error BCE0024

Not sure what i did wrong but i keep getting this error:

Assets/Scripts/NodeController.js(5,31): BCE0024: The type 'CameraNode' does not have a visible constructor that matches the argument list '(UnityEngine.Vector3, float)'.

This is the script:

var range : float;

function Start() {

var myNode : CameraNode = new CameraNode(transform.position, range);
gameObject.Find("Main Camera").GetComponent(CameraController).cameraNodes.push(myNode);

}

Any help would be appreciated.

The error message pretty much tells you everything…you’re giving it a Vector3 and a float, but there’s no constructor for that class which takes a Vector3 and a float. So you have to use types that you have a constructor for, or write a new constructor that takes those types.