Error message


Can anyone tell what I am doing wrong?

Why is there an Error39??


sketch_aug18a.pde (1.73 KB)

What do you mean by "Error39"? Post the exact message you are getting, and describe what you do to get that message.

Also, what operating system are you using? What version of the IDE? What board?

That code will not compile for me:

sketch_aug18a.cpp: In function 'void loop()':
sketch_aug18a:39: error: 'TNCVAL' was not declared in this scope
sketch_aug18a:43: error: expected `}' before 'else'
sketch_aug18a:79: error: 'COIL13' was not declared in this scope
sketch_aug18a.cpp: At global scope:
sketch_aug18a:85: error: expected declaration before '}' token

sorry about that :frowning: guess I got a little confused :smiley:

I use Windows 7 Home Premium 64-bit

I downloaded the IDE from like a week ago. Where can I see what version I've got?

Is this the Error39 you are referring to?
sketch_aug18a:39: error: 'TNCVAL' was not declared in this scope

If so, the 39 refers to the line the compiler found the error. Note that this isn't likely to be the line number in your program because of the preprocessing the IDE does.

That error is telling you you're using TNCVAL as a variable, but you haven't declared it anywhere. A simple way to remedy that is:

  int TNCVAL = analogRead(0);

There are a number of other compilation errors you'll need to fix after that one though

Thank you :smiley:

That did it