inxt-generation: when offering alternate code, please try to explain any changes you made. I didn't notice anything different in your code.
johnsmithbear: I assume this is not what you intended: When the light reading is between 37-42, the robot will backup one rotation, turn for ZERO degrees, then continue forward. (it's actually set to turn forever, but not wait any time)
It doesn't exactly sound like that's your only problem. I'd suggest you display your counter values INSIDE the main loop, so you can see if they're changing.
---> Link to lots of MINDSTORMS stuff under my picture --->