So I have a function to open a gameobject called Inventory, but it is not working properly?

I decided that I wanted to mess around with a function to open and close an inventory depending on a boolean value, but I can not get it to work properly. Any help here?

public class Player_Controller : Entity
{
    protected GameObject Inventory;
    protected bool isShowing = false;


    void Start ()
    {
            Inventory = GameObject.Find("Inventory");
    }

    void inventoryOpenClose(bool isShowing)
    {
        if (isShowing == false)
        {
            Inventory.SetActive(true);
            Time.timeScale = 0;
            isShowing = true;

        }
        else
        {
            Inventory.SetActive(false);
            Time.timeScale = 1;
            isShowing = false;
        }
    }


    // Update is called once per frame
    void Update ()
    {
	    if(Input.GetKey(KeyCode.W))
            {
                transform.position += Vector3.up * speed * Time.deltaTime;
            }
        if (Input.GetKey(KeyCode.S))
            {
                transform.position += Vector3.down * speed * Time.deltaTime;
            }
        if (Input.GetKey(KeyCode.A))
            {
                transform.position += Vector3.left * speed * Time.deltaTime;
            }
        if (Input.GetKey(KeyCode.D))
            {
                transform.position += Vector3.right * speed * Time.deltaTime;
            }
        if (Input.GetKeyDown(KeyCode.E))
            {
            //IS NOT WORKING, FIX ME
                inventoryOpenClose(isShowing);
            }

    }

}

Remove the local bool isShowing from inventoryOpenClose. Currently it is just setting the local bool to true or false because it has the same name as the protected one.

void inventoryOpenClose()

That will work or you could simplify this a bit and remove the function entirely:

        if (Input.GetKeyDown(KeyCode.E))
        {
            isShowing = !isShowing;

            if (isShowing == false)
            {
                Inventory.SetActive(true);
                Time.timeScale = 0;
            }
            else
            {
                Inventory.SetActive(false);
                Time.timeScale = 1;
            }
        }