Go Down

Topic: Error message (Read 794 times) previous topic - next topic



Can anyone tell what I am doing wrong?

Why is there an Error39??

Kind regards
Simon Madsen


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
The art of getting good answers lies in asking good questions.


sorry about that :( guess I got a little confused :D

I use Windows 7 Home Premium 64-bit

I downloaded the IDE from arduino.cc like a week ago. Where can I see what version I've got?
Kind regards
Simon Madsen


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:
Code: [Select]

 int TNCVAL = analogRead(0);

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


Thank you :D

That did it
Kind regards
Simon Madsen

Go Up