RFID code doesnt work.

Could somebody tell me why this code doesnt work? I’m sure i connected everything right.

#include <LiquidCrystal.h>
#include <SoftwareSerial.h>

SoftwareSerial RFID = SoftwareSerial(13, 10);
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//int hacking = 0;
char c;
String msg;
int rfid = 0;


void setup() {

  lcd.begin(16, 2);
  Serial.begin(9600);
  pinMode(A0, OUTPUT);

}

void loop() {


  //////////////////////////////////////////////////

  while (Serial.available() > 0) {
    c = Serial.read();
    msg += c;
  }

  if (msg.length() > 10) {
    msg = msg.substring(1, 13);

    if (msg == "310047BF3FF6") {
      if (rfid == 0) {
        rfid == 1;
        digitalWrite(A0, HIGH);
        lcd.setCursor(0, 0);
        lcd.print("1.");
      } else if (rfid == 1) {
        rfid == 0;
        digitalWrite(A0, LOW);
        lcd.setCursor(0, 0);
        lcd.print("0.");
      }
    }

    msg = "";

    delay(300);
  }

 
}

What does "doesn't work" mean?

You could maybe use the auto format tool before posting code.

I mean when i try use antena with rfid tag it should trigger the led. The rfid code is correct.

You have an instance of SoftwareSerial, but you're not using it - is that perhaps significant?

Jabbadabbadahaht:
I mean when i try use antena with rfid tag it should trigger the led. The rfid code is correct.

Well, not really:

      if (rfid == 0) {
        rfid == 1;