Trouble with case insensitive Compare...

Hi there,
Im’m having trouble getting this case insensitive compare to work properly, for some reason it doesn’t seem to matter what I put in the Text1.text it thinks they match all the time.

Any ideas what I might be doing wrong here?

var Text1 : TextMesh;

function Update () {
	if(String.Compare("TeSt", Text1.text, false)){
		print ("Yey");	
	}
}

Thanks
Pete

String.Compare doesn’t return a boolean, but an Int. The number represents the the lexical relationship.

if(String.Compare(....) == 0)
{
// same
}
else
{
// different
}

Awesome! Thanks mate :slight_smile: