Namespace error....what???

After I updated my Unity version from 5.1.1p2 to 5.2.3, I’ve been having so many frustrating problems, many of which I’ve already resolved, but this is one of the remaining ones. For some reason I keep getting the error:

Assets/Scripts/Mecanim_Control_melee.cs(5,14): error CS0101: The namespace global::' already contains a definition for Mecanim_Control_melee’

And I have no idea why. Here’s the code in that script:

public class Mecanim_Control_melee : MonoBehaviour {
	public Animator animator;
	public bool leftMouseClick=false;
	public bool rightMouseClick=false;
	public bool canControl=true;
	private float shift_axis_late;
	public float leftMouseClicks;

	private float animLayer2;
	public float inputX;
	public float inputY;
	public float inputJump;


	

	void Start () {
		animator = GetComponent<Animator>();

	}
	
	void OnAnimatorIK(){
		animator.SetLayerWeight(1, 1f);
		animator.SetLayerWeight(2, animLayer2);
		
		if(canControl){
			Vector3 camDir =  transform.position - Camera.main.transform.position;
			Vector3 lookPos = transform.position + camDir;
			lookPos.y = transform.position.y -(Camera.main.transform.position.y - transform.position.y) + 10f;
			//animator.SetLookAtWeight(0.2f, 0.2f, 0.8f, 0.99f);
			//animator.SetLookAtPosition(lookPos);

		}
		
		
	
	}
	
	void Update () {
	
		if(leftMouseClick){
			StartCoroutine("TimerClickTime");

		}
		
		if(animator){	
			
			shift_axis_late = Mathf.Clamp((shift_axis_late - 0.005f), 0.0f, 1.1f);
			animLayer2 = Mathf.Clamp((animLayer2 - 0.01f), 0.0f, 1.0f);
			
			animator.SetBool("LeftMouseClick", leftMouseClick);
			
			animator.SetFloat("LeftShift_axis", shift_axis_late);
			animator.SetFloat("Axis_Horizontal", inputX);
			animator.SetFloat("Axis_Vertical", inputY);
			animator.SetFloat("Jump_axis", inputJump);
			animator.SetBool("RightMouse", rightMouseClick);

		}
		
		
		if(canControl){
					
		
			inputX = Input.GetAxis("Horizontal");
			inputY = Input.GetAxis("Vertical");
			inputJump = Input.GetAxis("Jump");
			leftMouseClick = Input.GetMouseButtonDown(0);
		
			
	
				
		if(Input.GetKeyDown(KeyCode.LeftShift)){
			shift_axis_late += 0.25f;
			
		}
		
	
		if(Input.GetAxis("Fire2")>0){
				rightMouseClick=true;
				animLayer2=0.5f;
		}
			else{
				rightMouseClick=false;
			}	
		


		//sync animator Y_axis rotations with Main Camera	
		if(inputX+inputY!=0){
			Vector3 camDir =  transform.position - Camera.main.transform.position;
			Vector3 lookPos = transform.position + camDir;
			lookPos.y = transform.position.y;
			transform.LookAt(lookPos);
		}

		}
		
	}
		



	void FightCombo(){   //every left mouse click +1 to animation number counter

		leftMouseClicks += 1f;
		animator.SetFloat("LeftMouseClicks", leftMouseClicks);

		if(leftMouseClicks>2f){
			leftMouseClicks = 0f;
		}

	}	

	IEnumerator TimerClickTime(){  //timer, few seconds after click mouse bool leftMouseClick = true
	
		yield return new WaitForSeconds(0.1f);
		leftMouseClick=false;
		yield return null;
	
	}
	
	
	IEnumerator InAction(){ //recieve message from fight animation in mecanim controller
		
		yield return null;
	}
	
	
	IEnumerator AnimationEnd(){//recieve message from fight animation in mecanim controller
		
		yield return null;
	}


}//The END

Any help would be seriously appreciated!!

This means the class called “Mecanim_Control_melee” has already been defined in the global namespace as the files do not have a predefined namespace.

In the asset file system the files themselves cannot have the same name but the classes within them can (if the classes are in different files).

By bet is that you copy and pasted the file and renamed it so you could mess with it but forgot to change the class name in the file to match and now there are 2 files with different names but each contain a class with the same name?

I could have explained this better. Sorry.

But check similar files for classes that are named the same.