I got trouble with the programming

Hey guys, I'm new to this website and I have been building robots before and this website has been inspiring to me. :)
Yet, I have been building four robots: 2 of them are Fritsl's design, the "start here" and "little 8" and the other 2 are my own design. Now here's the problem, the little 8 robot is fine and so is one of my design with the parallax ping sensor., but with the other 2 the "start here" with the sharp sensor and my other design with the SRF005 sensor. I have been working on their programming for days and all they can do is move their servo. and move an inch forward and backwards. I was super super close to getting into the correct programming by moving them around and trying to get these robots to life like how you guys have them done in videos. I've looked around all over the website for ideas on how to fix the programming. Sorry if i had to borrowed yours, like I said, I'm new to this website and I'm still learning the basics. If you guys got any ideas to help me with my robots and not make them move only forward and backwards one inch, please your comments below

thank you in advance :). 

Given enough eyeballs all bugs shallow
Can you post your code?