0

As the title suggests, I have many "expected `)' before ';' token" errors. The issue is, I have this stuff in. So now I am confused, why am I getting this if the things are there.

I am new here and had an issue with adding code, so here is the pastebin link to it: http://pastebin.com/4WXxsXkB

And here is the the pastebin link to the error: http://pastebin.com/QyehP86M

Does anyone understand how this could happen?

asked Nov 4, 2014 at 19:35
1
  • 2
    #defines do not have a ';' after them try removing these Commented Nov 4, 2014 at 19:37

1 Answer 1

5

You have two #define statements at the top of your code

#define trigPin 3; 
#define echoPin 2;

The way #define works is that it replaces every instance of the name with everything after it on the line so trigPin is being replaced with 3; as opposed to 3 as intended.

Fixing this should solve some of your problems.

Martynas
5383 silver badges10 bronze badges
answered Nov 4, 2014 at 19:41
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.