This is your first error
Same problem with Arduino tutorial book; check where the variable is declared