Int increased twice and not only once

Hi,
I have a scoreboard in my simple football game, and i want to increase team’s score by 1 when the ball passes the goal line. But when it goes in the cage, the score increases by 2, like 0-0 to 2-0…

Here’s my Update method :

void Update ()
{
	lol = transform.position.x;

	int caca = Team1Score-1;

	if (lol <= -84.4)
	{
		Team2Score++;
		resetBall();
	}

	else if (lol >= 84)
	{
		Team1Score = (Team1Score +1) + Team1Score - (caca);
		resetBall();
	}

	else
	{
		Team1Score = Team1Score -1;
	}

	text.text = Team1Score + "       -      " + Team2Score;
}

If i don’t put the second and third else, the score increments to the infinite… Someone knows why ? Thanks for your help.

Your score is increasing by 2 due to arithmetic

int caca = Team1Score-1; (line 5)
Team1Score = (Team1Score +1) + Team1Score - (caca); (line 15)

can be simplified to

Team1Score = (Team1Score +1) + Team1Score - (Team1Score-1);
Team1Score = (Team1Score +1) + Team1Score - Team1Score+1;
Team1Score = (Team1Score +1)+1;
Team1Score = Team1Score +2;

I don’t see why you don’t just get rid of line 5 and replace line 15 with

Team1Score = Team1Score +1;

but if you just want fix your current problem you need to change line 15 to

Team1Score = 2*Team1Score - (caca);