Help please to improve this obstacle avoiding robot project.

Oops:

  if (distance >= 30 && OldDistance <= 29);{

Get rid of the semicolon.