Re: why wont my line tracking code work?
Just press edit on your post, and take a look at the "code" tags that are around the code. Also, make sure that you're copying your whole program, as I see a missed curly bracket. As for your program, try to step through your program like the microcontroller would, seeing when each condition is met. Here's some pseudocode for what it's doing assuming the missed curly bracket goes at the end:
Unless you keep button pushed down through the entire program, it will only go forward an turn.