Rc car controller using the RC-switch library simulate this circuit &ndash; Schematic created using CircuitLab

(Newbie in arduino)
Hi so i have a project which involves creating an rc car which uses the 433Mhz rf module and an arduino nano with a servo motor and an ultrasonic parking sensor.

I'm having problems with the code both on the transmitter and receiver, 
Here is the code for the transmitter.

 #include &lt;RCSwitch.h&gt;
RCSwitch mySwitch = RCSwitch();
// Assigning controller buttons to Digital Pins
 const int forward = 8;
 const int reverse = 9;
 const int rightTurn = 10;
 const int leftTurn = 11;

 int Fwd = 0
 int Bwd = 0
 int Lt  = 0
 int Rt  = 0

void setup () {
  pinMode (forward, INPUT);
  pinMode (reverse, INPUT);
  pinMode (rightTurn, INPUT);
  pinMode (leftTurn, INPUT);
  mySwitch.enableTransmit(7);
  Serial.begin (9600);         // Debugging only
  Serial.println ("Transmitting");
}

void loop () {
  Fwd = digitalRead(forward);
  Bwd = digitalRead(reverse);
  Rt  = digitalRead(rightTurn);
  Lt  = digitalRead(leftTurn);

  if (Fwd == HIGH) {
    mySwitch.send('1');
    Serial.println ("Forward");
    delay(100);
  }

  if (Bwd == HIGH) {
    mySwitch.send('2');
    Serial.println ("Reverse");
    delay(100);
  }

  if (Rt == HIGH) {
    mySwitch.send('3');
    Serial.println ("Left Turn");
    delay(100);
  }

  if (Lt == HIGH) {
    mySwitch.send('4');
    Serial.println ("Right Turn");
    delay(100);
  }
}


And here's the code for the receiver

#include &lt;RCSwitch.h&gt;
#include &lt;Servo.h&gt;

const int IN1 = 3;
const int IN2 = 4;
const int trigPin = 5;
const int echoPin = 6;
int distance = 0;

RCSwitch mySwitch = RCSwitch();
Servo myservo;

void setup () {
  mySwitch.enableReceive(2);
  myservo.attach(7);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  Serial.begin (9600);    // Debugging only
  Serial.println ("Receiver Ready");
}

void loop () {
 if (mySwitch.available()) {

    int value = mySwitch.getReceivedValue();

      if(value == '1') {
        forward ();
        Serial.println (" = forward");
      }

      if(value == '2'){
        backward ();
        Serial.println (" = backward");
      }

      if(value == '3') {
        left ();
        Serial.println (" = left");
      }

      if(value == '4') {
        right ();
        Serial.println (" = right");
      }
      Serial.print(" ");
    }

}

void forward () {
  digitalWrite (IN1, LOW);
  digitalWrite (IN2, HIGH);
}
long duration;
int value = mySwitch.getReceivedValue();
void backward () {
  if ((distance &gt; 10)&amp;&amp; (value == '2'))
  {
  digitalWrite (IN1, LOW);
  digitalWrite (IN2, LOW);
  }
  else if ((distance &lt; 10)&amp;&amp; (value == '2'))
  {
  digitalWrite (IN1, HIGH);
  digitalWrite (IN2, LOW);
  }
  delayMicroseconds(10);
  // Clears the trigPin
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  // Reads the echoPin, returns the sound wave travel time in microseconds
  duration = pulseIn(echoPin, HIGH);
  // Calculating the distance
  distance= duration*0.034/2;
  // Prints the distance on the Serial Monitor
  Serial.print("Distance: ");
  Serial.println(distance); //distance is the returned integer,
}

void right () {
  myservo.write(0);
  digitalWrite (IN1, LOW);
  digitalWrite (IN2, HIGH);
}

void left () {
  myservo.write(90);
  digitalWrite (IN1, LOW);
  digitalWrite (IN2, HIGH);
}


The problem is when i run the code the buttons start getting pressed even if I'm not pressing them and even when i disconnect them from the arduino. and also the receiver cant receive any data.
Please help
As you wrote in your comment, you didn't use  pullup or pulldown resistors for connecting the buttons. In this case the pin is floating, whenever the corresponding button is not pressed. It will pick up random noise from the environment and change it's state randomly.

A pullup or pulldown resistor defines a specific value for the pin, if the button is not pressed (LOW or HIGH). The value of such is a resistor is not critical, as long, as it isn't a too big load. Pick some value in the kiloohms (for example 10kOhm).

But you don't need external resistors for this. The Atmega328, which is the heart of the Arduino Nano, already has buildin pullup resistors for each digital output pin. You can activate them by using

pinMode(pin_number, INPUT_PULLUP);


In this case you will have to change the if-statements to check for LOW instead of HIGH and connect the button to ground instead of 5V, because with a pullup resistor in idle state the pin will be pulled up to 5V and the button can then pull it down to ground.