joining bluetooth and RFID

Hello,
I am beginner in programing in arduino. I am trying to join to types of door unlocking programs. One is by bluetooth and secound by RFID card reader. Each of them works separately. I would be really glad if someone could help me with this stuff.

BLUETOOTH CODE:

// Pin 13 - LED
int led = 13;
int state;

void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

void loop() {
if(Serial.available() > 0){
state = Serial.read();}

if (state == '1') {
digitalWrite(led, HIGH);} // turn the LED on (HIGH is the voltage level)

else if (state == '2') {
digitalWrite(led, LOW);} // turn the LED off by making the voltage LOW

delay(100); // wait for 100ms

RFID code is here :

there is also my attempt

rfid_modifiedwjanek.ino (22.2 KB)

Please read this before posting a programming question and follow the recommendations that it contains.

What problems did you encounter with the combined program ?

here I add screen shot

#include ''exit status 1
'MFRC522_Init' was not declared in this scope''

How many loop() functions do you have in your program ?

two

How will the program know which one to use ?

When the first one does not detect mobile's bluetooth the another one should start,but no idea how to do it.

It should wait simultaneously for either bluetooth or rfid connection.

You cannot have two functions with the same name in an Arduino program.
Move all of the code from both loop() function into the same loop() function. Change the code so that if the Bluetooth input is not detected (how can you tell ?) then the RFID code runs.