Adding the values of two functions together to display the total

Hi there,

Is it possible to add the values of two functions together in a separate function?

	public void TotalScoreLeft (int playerScoreLeft)
	{
		totalScoreLeft = playerScoreLeft;
		Debug.Log ("Score is being added left" +totalScoreLeft);

	}

	public void TotalScoreRight (int playerScoreRight)
	{
		totalScoreRight = playerScoreRight;
			Debug.Log ("Score is being added right" +totalScoreRight);
		
	}

	public void TotalScore (int totalScoreRight, int totalScoreLeft)
	{
		totalScore = totalScoreRight + totalScoreLeft;
		Debug.Log ("Total score is: " + totalScore);
	}

I basically want to display a GUI of TotalScores value, but the Debug.Log isn’t printing the value of totalScore. How could I add the values of TotalScoreLeft and TotalScoreRight together?

Many thanks.

This is also valid:

public float TotalScoreLeft (int playerScoreLeft)
{
    float totalScoreLeft = playerScoreLeft;
    return totalScoreLeft
}

public float TotalScoreRight (int playerScoreRight)
{
    float totalScoreRight = playerScoreRight;
    return totalScoreRight
}

public void TotalScore (int totalScoreRight, int totalScoreLeft)
{
    totalScore = TotalScoreRight(totalScoreRight) + TotalScoreLeft(totalScoreLeft);
}

I assume this is pseudo code and the actual code is more complex. Otherwise there is no real value to having three methods to add together two floats.