Trying to Add Listener to itself

I’m trying to add an Add Listener component to a button through code. While this itself is working I find that I can only do it if I create the button public and set it in the inspector. I’m trying to figure out how to set the variable in the script. This is my code so far. (It’s a clicker game)

public float cpsToAdd;
    public float price;

    ClickerController controller;
    Button button;

    void Start()
    {
        controller = controller.GetComponent<ClickerController>();

        button = this.gameObject.GetController<Button>();
        button.onClick.AddListener(delegate { controller.AddClicks(cpsToAdd); });
    }

Does the code above complie? I think that the problem is that you use controller.GetComponent (while controller is unasigned) instead of gameObject.GetComponent(). Also, at line 11 you use .GetController instead of .GetComponent. And lastly, you can use a lambda function at line 12. i attached the modified code below

	public float cpsToAdd;
	public float price;

	ClickerController controller;
	Button button;

	void Start()
	{
		controller = gameObject.GetComponent<ClickerController>();
		button = this.gameObject.GetComponent<Button>();
		button.onClick.AddListener(() => controller.AddClicks(cpsToAdd));
	}