What is wrong with this code?

there are semicolons on those lines. when I run it, it tells me “expecting }, found ‘else’”, yet all my {}s are in the right location