Javascript GUI.Button help, Error BCE0077

Hello, I am trying to make a button that takes the player from the main menu to the game. I am getting this error: Assets/titleScript.js(7,29): BCE0077: It is not possible to invoke an expression of type ‘int’.
And here is my code:

var btnTexture: Texture;

function onGui()
if(GUI.Button(Rect(10,10,50,0(Screen.width -50,50,0,0),btnTexture)));

function Update () {


Any help would be greatly appreciated!

Hi !

Several things :

The function should be OnGUI, not onGui.

Then your error is in : GUI.Button(Rect(10,10,50,0(Screen.width -50,50,0,0),btnTexture))

Rect takes only 4 arguments, you have something weird going on 4th argument. I don’t really know what you really wanted, maybe