Menu material error

Hi,

I have a cube with the button script which I am trying to modify. To show a button and a picture of the texture that I want to be applied.

var btnTexture : Texture;
var bumpMap : Texture;
function OnGUI() {
    if (!btnTexture) {
        Debug.LogError("Please assign a texture on the inspector");
        return;
    }
    if (GUI.Button(Rect(10,10,50,50),btnTexture))
        Debug.Log("Clicked the button with an image");
    if (GUI.Button(Rect(10,70,50,30),"Click")){
        Debug.Log("Clicked the button with text");
		renderer.material.SetTexture("_BumpMap", bumpMap);
	}
}

So, when I run it it says that material doesn’t have a texture property _BumpMap. Why is that? Do I need to apply something else to the material?

P.S. - post the answers as comments to this post or I will answer them as comments in this post.

Thank you all.
Cheers.

Ensure the Material on the Renderer is a Bumped one.