xxxxxxxxxx
Is there a syntax error anywhere? A missing '(' og a missing ';'?
xxxxxxxxxx
You declare variables in the scope of setup(), and you try to use them in the scope of loop(), so the compiler tells you that you haven't declared them to be used in the scope of loop() . . .