Error 7. Condition in IF, WHILE, FOR statements has to be Numeric or Boolean type. You can not use STRING here.

Occurs when you attempt to use string as a condition in if/while/for statements.

For example:

if( "text" ) // incorrect
{
   
// do something
   x =
1;
}

The condition in if/while/for should evaluate to true/false:

if( "text" != "someothertext" ) // correct, != (not equal to) operator gives true/false value
{
   
// do something
   x =
1;
}