line follower with ultrasonic

im trying to write a program that unfolds my robot and stop when it reaches rings. i can get it to unfold and pick up the stack but I wrote a Line Following program and I know it works because i’ve used the same one on a previous robot before but when i try to combine the two it wont follow the line. it just stops after it gets the rings and it has another 10 seconds left in autonomous. I put the Line follower in a While Loop right before the ultrasonic starts. Can anyone help me? and how do I take screen shots on windows 7? i can put up a screen shot. thanks