'Else' without 'if', same errors through the code - CodeProject
You've just removed the second else keyword from each block. The code within the braces will always execute, overwriting the variables you've just set in your if..else block. Stop making random changes to your code. Get a piece of paper and a pen, and write down exactly what you want the code to do, step by step. Then write the code to do that.