Camera Collider namespace issue

I am trying to add a C# script to my camera to keep it from penetratinng into other objects. As soon as I add the script to either my “Standard Assets”, “Pro Standard Assets” or “Plugins” folder, I get the:

Assets/Plugins/Camera_Collider_C_Sharp.cs(1,14): error CS0116: A namespace can only contain types and namespace declarations

error - the script:

public float minDistance = 1.0f;
public float maxDistance = 10.0f;
Vector3 dollyDir;
float distance; 

void Awake()

{    dollyDir = transform.localPosition.normalized;    
distance = transform.localPosition.magnitude;
}

void Update()
{        
	
Vector3 desiredCameraPos = transform.parent.TransformPoint( dollyDir * distance );


// (optional) put layers you don't want to collide with  here (probably things like enemies)        
const int ignoreLayer1 = 1 << 18;         
const int ignoreLayer2 = 1 << 19;        
int layerMask = ignoreLayer1 | ignorelayer2;
layerMask = ~layerMask;

RaycastHit hit;
if( Physics.Linecast( transform.parent.position, desiredCameraPos, out hit, layerMask ) )        
{            
distance = Mathf.Clamp( hit.distance, minDistance, maxDistance );        
}        
transform.localPosition = dollyDir * distance;
}

Is that the whole script or have you deliberately omitted the class declaration?

That is the whole kitten-kaboodle I cut and pasted from a forum thread…

Sounds like I am missing some goodness…

Can you hook a brother up or point him in the right direction to get the rest of the code?

Thanks

Bullet point 1 in the page andeeee linked…

This was my 1st venture editing a C# script… just getting the basics down here…

thanks for the help