Operator '==' cannot be used!

Hello,I’ve this problem respect to “switch”…You watch my part of script…
Please,help me!

public var WeaponType : TypeOfWeapon;

enum TypeOfWeapon
{
	M9,
	ScarH,
	M4A1,
	ACR,
	MP5,
	STRIKER,
	FIVESEVEN,
	P99,
	MINIUZI,
	UMP45,
    AK	
};

function Update(){
	
	switch(TypeOfWeapon)
	{	
			
	    case TypeOfWeapon.M9:
        BulletVelocity = 1000;
	    Ammo = 30;
	    totalAmmo = 30;		
	    BulletDamage = 25;
	    SingleFire = true;
	    break;
	    
	    case TypeOfWeapon.ScarH:
	    BulletVelocity = 1000;
	    Ammo = 100;
	    totalAmmo = 100;		
	    BulletDamage = 54;
        RapidFire = true;
        RateOfFire = 0.220000;
	    break; 	    
  }									
}	


In Console there's this problem:

Assets/Scripts/WeaponShootManager.js(70,9): BCE0051: Operator ‘==’ cannot be used with a left hand side of type ‘System.Type’ and a right hand side of type ‘TypeOfWeapon’.

TypeOfWeapon is an enum. In your switch statement you should be comparing the value of a variable that has been set to one of those enumerated states, e.g

switch (currentlySelectedWeapon) { case TypeOfWeapon.Knife:...

this might help you…