Whats wrong with my GUI.Toggle?

Hi Unity Community,
This is a question with a simple solution I hope. I have a GUI Toggle as show below and I am trying to use the function like so:

public bool pressed = false;

//bool Toggle(Rect position, bool value, string text, GUIStyle style); //the template im using

pressed = GUILayout.Toggle(new Rect(10, 50, 50, 50), pressed, "Back*", "Button"); 

I am trying to make my toggle act as a button and position it, which is probably my problem… The toggle acting as a button works fine if I do not include the Rect(x,x,x,x) argument. Anyways Unity keeps giving me this error

“Assets/Scripts/SquadSelect.cs(151,37): error CS1502: The best overloaded method match for `UnityEngine.GUILayout.Toggle(bool, UnityEngine.Texture, params UnityEngine.GUILayoutOption)’ has some invalid arguments”

Which I dont understand because it isnt even the same format as what I am using. Does anyone know why this isnt working or a solution I can use? Thanks,

See the docs for GUILayout.Toggle for the parameters you can use. Your code has a Rect, a bool, and two strings, which doesn’t match anything that you can actually use. GUILayout functions typically don’t use a Rect, to start with. If you want to use a Rect, you need to use GUI.Toggle.

You are using guilayout which is uses default layout in unity. If you want to position button at your specified place, Use GUI.toggle as below.

pressed = GUI.Toggle(new Rect(10, 50, 50, 50), pressed, “Back*”, “Button”);