Add 2 Parameters in While loop

Can anyone please tell me how can i add 2 parameters in while loop in unity 5(I mentioned it because i don’t if there is any new rule has cam for unity 5), i want to do something like this :-

while(attack<=0 && enemy>0)
{

}

I am trying but it’s not working and not giving me the parameter autofill option after && , i think there is something wrong .

Nesting the loops won’t have the expected result.

The “parameter” as you call it is a boolean condition (called expression). It’s not abnormal to have an expression like this : (attack <= 0 && enemy > 0). It will return a boolean the will statement will evaluate like any other boolean expression.

Just, make sure attack and enemy are numeric values.

What is the error raised by the compiler ?

have an “if” inside the while, like this:
while ( attack <= 0 ) {
if ( enemy > 0 ) {
// Do stuff here!
}
}

you could try nesting them…

while(attack<=0 )
{
   while(enemy>0)
   {

   }
}