Go Down

Topic: Error message (Read 626 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


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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131