Question: I have a c# script in Unity and have an issue. I'm trying to check if two floats equal to zero for a countdown timer. once both reach zero, do something.

when i do

```
if (minutes && seconds <= 0){
        Debug.Log("countdown timer has finished");
    }

```

I get the error;

> 
> error CS0019: Operator `&&' cannot be applied to operands of type`float' and `bool'
> 
> 
> 

I understand what's going on here, my question is how can I check if both floats reach zero, debug.Log.

Answer: 
You can't check more than one variables like that. You must change your code:

```
if (minutes <= 0 && seconds <= 0){
        Debug.Log("countdown timer has finished");
    }

```

Or, if you have many variables to check like that, then you can create new List and use `Any()` method from th `System.Linq` namespace. (***But,*** *as @Marc commented if you have not a list yet, then it is not recommended*): 

```
if (!(new[] { firstFloat, secondFloat, thirdFloat }).Any(x => x > 0));

```

But, if you have a list or an array, it would be much better and simpler:

```
if (!myList.Any(x => x > 0));

```
C# doesn't provide any syntax to combine application of single condition / operators on many variables directly in "if" condition (but of course you could do that with functions). 

You have to test separately each condition :

```
if (minutes <= 0 && seconds <= 0)
{
   Debug.Log("countdown timer has finished");
}

```

You can also use a nicer datatype to handle all "time" related tests, such as Timespan, or even a "total seconds count" single variable. It's sounds strange to have separate "seconds" and "minutes" variables.