BCE0044: expecting :, found 'if' ???

Hi, I keep getting this message. I don’t know what’s wrong with it. I tried putting ‘;’ on the last part of the if statement, the message still shows.

Thanks in advance.

Here’s my code.

if (GUI.Button,(new Rect(10, 50, 50,20), Close))
        
 clicked = false;

I don’t know what Close is, but I guess it’s a string and you forgot the “”. Remove the , after Button and your good.

if (GUI.Button(new Rect(10, 50, 50,20), "Close"))
    clicked = false;