probs with limit awitch need help

ya iam having problems with the limit switch iam trying to connect and program two of them to work with a ultrasonic sensor and the second limit switch is not working my vex kit is kinda old i have a starter kit for the ver. 5 logic and kit and a new easy c soft ware can you tell me the way to fix my code i have from scratch a while loop (1) to the assigned sensors then a if limit > 0 statement op control then else statement so plz help i need this for a senior product . ty by the pictures are snap shots of the program the downloader woldent allow me to load the program
vex  code1.jpg
vex code 2.jpg

We need more information to help you.

  1. What problem are you having? What is the robot doing while the code runs?
  2. You will need to put your code in a compressed zip folder to upload it.