error CS0029: Cannot implicitly convert type `void' to `string'

I’m trying to add a label to show the game score and it keeps coming up with this error, the last line is the label I’m trying to add, it keeps giving me this “error CS0029: Cannot implicitly convert type void' to string’” error message, at the last line

public class EndSceneScript : MonoBehaviour {

//The texure to be drawn for the splash screen
public Texture2D backGroundTexture;
//width and height of button
public int buttonWidth=100;
public int buttonHeight=30;
//the space between the buttons
public int buttonSpacing=70;
//the start Y position of button
public int buttonYStart=300;
string nameText="";
int score;

void OnGUI(){
	//create splash screen
	GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),backGroundTexture);
	//store the start position
	int buttonyPosition=buttonYStart;
	//add button
	if (GUI.Button (new Rect(Screen.width/2-buttonWidth/2,
		buttonyPosition,buttonWidth,buttonHeight), "Main Menu"))
	{
		GameObject gameData=GameObject.Find("GameData");
		if (gameData!=null){
			GameDataScript gameDataScript=gameData.GetComponent<GameDataScript>();
		    gameDataScript.playerName=nameText;
		nameText=GUI.Label(new Rect(Screen.width/2-100.0f,50.0f,100.0f,20.0f),nameText+" Score:"+gameDataScript.score);

When you look at the return type of GUI.Label, it is void from the Unity Script Reference:

http://unity3d.com/support/documentation/ScriptReference/GUI.Label.html

So the debugger is telling you that you’re trying to convert the return type from GUI.Label, which is void, to a string value because nameText is declared as a string.

My guess without compiling it myself would be that you should take out the ‘nameText =’ part from your line of code. You should only have to declare the GUI.Label.