`int' does not contain a definition for `GetComponent' and no extension method `GetComponent' of type `int' could be found

Hi,maybe someone can help me. I want to use my int variable in another script, but I get this error. How can I solve this problem?

    public class GameSettings : MonoBehaviour {
    
    public int gameMode;
    
    	void OnGUI() 
    	{
    		if (GUI.Button (new Rect (Screen.width/100 * 50 -(Screen.width/100 * 25 /2), Screen.height/100*25, Screen.width/100 * 25, Screen.height/100 * 20), "Easy", customButton))
    		{
    			gameMode = 1;
    			Application.LoadLevel("Scene");
    		}
    
    		if (GUI.Button (new Rect (Screen.width/100 * 50 -(Screen.width/100 * 25 /2), Screen.height/100*50, Screen.width/100 * 25, Screen.height/100 * 20), "Normal", customButton))
    		{
    			gameMode = 2;
    			Application.LoadLevel("Scene");
    		}
    
    		if (GUI.Button (new Rect (Screen.width/100 * 50 -(Screen.width/100 * 25 /2), Screen.height/100*75, Screen.width/100 * 25, Screen.height/100 * 20), "Hard", customButton))
    		{
    			gameMode = 3;
    			Application.LoadLevel("Scene");
    }
}

public class BirdMovement : MonoBehaviour 
{
float Speed = 100f;

public int newGameMode;

	void Start ()
	{
		GameSettings targetScript = newGameMode.GetComponent<GameSettings>();

		switch(newGameMode)
		{
			case 1:
			{
			float Speed = 100f;
			Debug.Log(flapSpeed);
				break;
			}
			case 2:
			{
			float Speed = 120f;
			Debug.Log(flapSpeed);
				break;
			}
			case 3:
			{
				float Speed = 140f;
				Debug.Log(flapSpeed);
				break;
			}
			default:
			{
				float Speed = 160f;
				Debug.Log("default");
				break;
			}
		}

	}

On line 34, you have:

 newGameMode.GetComponent<GameSettings>();

But ‘newGameMode’ is declared as an int on line 30. GetComponent() only works on classes that inherit from the Component class…typically it is used on a GameObject. If the ‘GameSettings’ script is on this same game object, you can do:

 gameObject.GetComponent<GameSettings>();