"Valuename" is not name a type

아두이노:1.5.8 (Windows 8), 보드:"Arduino Due (Programming Port)"

IoT_RobotHand.ino:100:5: error: 'swVal22' does not name a type
IoT_RobotHand.ino:101:3: error: expected unqualified-id before 'if'
컴파일 오류 발생.

이 리포트는 많은 정보를 포함합니다
"컴파일하는 동안 상세 출력 보이기"
파일 > 설정에 사용가능하게 됨

I set my value's name as 'swVal22', but IDE outputs error message like above.
Why this message outputs?

IoT_RobotHand.ino (2.29 KB)

The error is:

IoT_RobotHand.ino:96:5: error: 'buttst22' does not name a type

It appears because you cannot have code outside of a function. Indent your code correctly and you will see the obvious mistakes.