C20019 error with '>=' cannot be applied to operands 'string' and string'

I’m trying to make it so that when my static ball8 gets hit by a moving ball(ball), and the count is greater than or equal to 40, a yellow wall changes to red.

For some reason I get the error with && countText.text >= “40”… but if I put && countText.text == “40”, then everything is fine. Its just the ‘>’ that messes everything up.

Any help would be appreciated. Thanks!

	if (ballCollideBall8.gameObject.tag == "ball" && countText.text >= "40") 
		//Ball8.SetActive (false);
		LeftYellowSideWall.GetComponent<LeftYellowWall> ().ColorChangeRed1();
		Ball8.GetComponent<MeshRenderer>().enabled = false;
		Ball8.GetComponent<CircleCollider2D> ().enabled = false;
		ball8Green = false;


You are trying to use ‘>=’ operator on strings, which is not defined. You should be comparing numbers not literals.
So first thing to do is convert your string to int.

int count = Convert.ToInt32(countText.text);
if (ballCollideBall8.gameObject.tag == "ball" && count >= 40) 

The reason why ‘==’ operator works fine is because it`s actualy defined, so you can compare strings, like:

“aaa” == “aaa” - true “aaa” == “asa” - false