How to make a GUI.box pop up under an if statement (new to programming)

This is pretty self explanatory I keep getting an error message in the code below.

void OnGUI () {
	if (playerLives = 0) ------> **Cannot implicitly convert type "float" to "bool"**
    {
	GUI.Box (new Rect (10, 10, Screen.width - 10, Screen.height - 10), "GAME OVER");
	}
}

I know what float and bool are but why doesn’t work? I set my =0 to < 1 and <= 0 but neither of these any effect when my playerLives went to 0.

You are not using the right operation. See the following examples:

var x = 5; // Value of x is now 5, this is called ASSIGNMENT

if (x == 5) {} // Checks if value of x is 5, this is called COMPARISON