Arduino Robot Project doubts

Hello guys, my college had just introduced arduino to us last week, and this week we are going to have a robot competition on maze solving. Since im new to C programming, i have some doubts :D i have a maze, a typical maze, and a maze solver robot, which our lecturer told us to input code into the robot to let it move inside the maze, the robot has 3 sensors installed which are front, lest and right sensor respectively.So i was thinking that the robot might move slight left or right due to the wheel allignment, and ive put some codes into it, and so i defined it as when the left sensor or right sensor detects a distance less than 5cm it moves either slight left or slight right. but here comes the problem, when i want to make it turn, let say turn left, i need to use my front sensor(no problem) and the right sensor(which if i define it as less than 3 cm it turns right), but will it like crash with my code on the right sensor i defined before?

I really need help guys T_T Appreciate it! Sorry for my bad english

We don't know, because we can't see your robot or your code.

Hello AWOL, this is my code.

Qualifying_Match_1.ino (4.28 KB)

I'm posting from my phone - I still can't see your code.

long fsr = FrontSensor();
long rsr = RightSensor();
long lsr = LeftSensor();

The hardware isn’t ready yet.

Why do you need three functions that do identical things, on different pins?

void loop(){
if (lsr<5||rsr<5)
{
  if(lsr<5)
  {
    SlightRight;
  }
  if(rsr<5)
  {
    SlightLeft;
  }
}

You have not assigned meaningful values to lsr, rsr, or fsr. That is NOT how you call a function.

What should I do Paul? I'm really lost. Can you help me with this?

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :)