🤔

CS8641#

'else' cannot start a statement.

A semicolon (;) will end a statement. Empty statements are valid code.
In this example code the scope created after the if statement is disconnected from the if.

if (example) ;
{
    // ...
}

This is the same as writing:

if (example)
{

}
{
    // ...
}
warning

Don't place a semicolon directly after an if statement.

Resolution#

Remove the semicolon (;) after the first if statement.

if (example) ; // <- Remove this semicolon.
{
    // ...
}
else
{
    // ...
}