I have a problem with GUI layout

I’m trying to implement a score board where players position and score is displayed. I have set the position of the group and put a box inside it with the heading “Top Scores” and 3 labels to be displayed as headers for the players position name and score. However now I am trying to use GUILayout to begin a vertical column to display position numbers 1 to 5 inside the pre defined area. I am getting an error message “error CS1501: No overload for method Label’ takes1’ arguments” for each of the labels I have made but as I understand I am not required to provide a position as they are already in the GUILayout. Any ideas why this is going wrong?

void OnGUI() 
	{
			GUI.BeginGroup(new Rect(Screen.width/2-200,Screen.height/4+100,400,1000));
			GUI.Box(new Rect(0,0,400,800), "Top Scores");
			GUI.Label(new Rect(15,20,100,20), "Position");
			GUI.Label(new Rect(100,20,150,20), "Name");
			GUI.Label(new Rect(300,20,100,20), "Score");
			GUILayout.BeginArea(new Rect(40,50,50,500));
			GUILayout.BeginVertical();
			GUI.Label("1");
			GUI.Label("2");
			GUI.Label("3");
			GUI.Label("4");
			GUI.Label("5");
			GUILayout.EndVertical();
			GUILayout.EndArea();
			GUI.EndGroup();
		}

If you’re using GUILayout, then you want GUILayout.Label rather than GUI.Label. You can’t really mix GUILayout with GUI.

–Eric

nice one thanks mate!