error exit status 1

so i have written a code for a nfc reader.
when i finaly got all the errors sorted out, i got stuck with a error exit status 1without any further infomation.

here is the code:

int STOP = 1;
int READ = 2;
int SERIAL = 3;
int state = STOP;

byte serial;
byte input;

  enum acces{
    NONE,
    PREMIUM,
    UNLIMITED,
    ADMIN
  };
  
class User{

  public:
  int uid, id, totvisits, monthvisits;
  String name, lName, lastVisit;
  static int users;
  boolean checkedin = false;
  acces type; 

  User(int idd,String namee,String lNamee,acces typee){
    id = idd;
    name = namee;
    lName = lNamee;
    totvisits = 0;
    monthvisits = 0;
    lastVisit = "none";
    type = typee;
    users++;
  }

  void checkin(){
    if(!checkedin){
      checkedin = true;
      totvisits++;
      monthvisits++;
    }
  }

  String printInfo(){
    String dot = ".";
    String semi = ";";
    String temp = id + dot + uid + dot + name + dot + lName + dot + totvisits + dot + monthvisits + dot + lastVisit + dot + checkedin + dot + type + semi;
    return temp;
  }
};

User u1(1,"Puck","Rietveld",ADMIN);
User u2(2,"Jaimy","VanWeeden",ADMIN);
User u3(3,"Thomas","VanWeeden",UNLIMITED);
User users[] = {u1,u2,u3};

void setup() {
  Serial.begin(9600);
  nfcSetup();
}

void loop() {
  if(Serial.available() > 0){
    state = SERIAL;
  }
  switch(state){
    case(1):
    if(cardPresent()){
      state = READ;
    }
    break;

    case(2):
    for(int i = 0; i < sizeof(users); i++){
      if(readNfc() == users[i].uid){
        users[i].checkin();
      }
    }
    break;

    case(3):
    //a = ask -> id
    //u = users
    //s = set -> u,i,f,l,t,m,v,s -> val
    //c = checkin -> id
    if(Serial.available() > 0){
      byte b = Serial.read();
      switch(b){
        case('a'):
        byte c = Serial.read();
        byte d = Serial.read();
        c = int(c + d);
        Serial.print(users[c].printInfo());
        break;

        case('u'):
        Serial.print(users[0].users);
        break;

        case('s'):

        break;

        case('c'):
        byte e = Serial.read();
        byte f = Serial.read();
        e = int(e + f);
        users[c].checkin();
        break;
      }
    }
    break;
  }
}

other tab:

#include <SPI.h>
#include <MFRC522.h>

const int RST_PIN = 9;
const int SS_PIN = 10;    
MFRC522 nfc(SS_PIN, RST_PIN);

boolean cardPresent(){
  if(nfc.PICC_IsNewCardPresent() && nfc.PICC_ReadCardSerial()){
    return true;
  }else{
    return false;
  }
}

String readNfc(){
  String id = "";
  for(byte i = 0; i < nfc.uid.size; i++){
    id.concat(String(nfc.uid.uidByte[i] < 0x10 ? "0" : ""));
    id.concat(String(nfc.uid.uidByte[i], HEX));
  }
  id.toUpperCase();
  nfc.PICC_HaltA();
  return id;
}

void nfcSetup(){
    SPI.begin();
    nfc.PCD_Init();
}

i hope its readable / understandable (some parts may be in dutch) and i realy hope someone can help me out

i got stuck with a error exit status 1without any further infomation.

Except for the rest of the error text. Use the Copy error messages button to copy it

Arduino: 1.8.10 (Windows 10), Board: "Arduino Nano, ATmega328P"


In file included from C:\Users\Bob\AppData\Local\Temp\arduino_build_342283\sketch\sketch_mar03a.ino.cpp:1:0:

C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:54:17: error: expected unqualified-id before numeric constant

 #define SERIAL  0x0

                 ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:3:5: note: in expansion of macro 'SERIAL'

 int SERIAL = 3;

     ^~~~~~

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino: In function 'void loop()':

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:84:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

       for (int i = 0; i < sizeof(users); i++)

                       ~~^~~~~~~~~

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:86:35: warning: invalid conversion from 'int' to 'const char*' [-fpermissive]

         if (readNfc() == users[i].uid)

                          ~~~~~~~~~^~~

In file included from C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/Arduino.h:232:0,

                 from C:\Users\Bob\AppData\Local\Temp\arduino_build_342283\sketch\sketch_mar03a.ino.cpp:1:

C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/WString.h:143:16: note:   initializing argument 1 of 'unsigned char String::operator==(const char*) const'

  unsigned char operator == (const char *cstr) const {return equals(cstr);}

                ^~~~~~~~

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:108:20: warning: jump to case label [-fpermissive]

           case ('u'):

                    ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:104:18: note:   crosses initialization of 'byte d'

             byte d = Serial.read();

                  ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:103:18: note:   crosses initialization of 'byte c'

             byte c = Serial.read();

                  ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:111:20: warning: jump to case label [-fpermissive]

           case ('s'):

                    ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:104:18: note:   crosses initialization of 'byte d'

             byte d = Serial.read();

                  ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:103:18: note:   crosses initialization of 'byte c'

             byte c = Serial.read();

                  ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:113:20: warning: jump to case label [-fpermissive]

           case ('c'):

                    ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:104:18: note:   crosses initialization of 'byte d'

             byte d = Serial.read();

                  ^

C:\Users\Bob\AppData\Local\Temp\arduino_modified_sketch_372967\sketch_mar03a.ino:103:18: note:   crosses initialization of 'byte c'

             byte c = Serial.read();

                  ^

Multiple libraries were found for "SPI.h"
 Used: C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\libraries\SPI
Multiple libraries were found for "MFRC522.h"
 Used: C:\Users\Bob\Documents\Arduino\libraries\MFRC522
Using library SPI at version 1.0 in folder: C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\libraries\SPI 
Using library MFRC522 at version 1.4.4 in folder: C:\Users\Bob\Documents\Arduino\libraries\MFRC522 
exit status 1
Error compiling for board Arduino Nano.

You are declaring variables in case code of switch/case

Put the case code blocks in { } to fix the "crosses initialization " errors then tackle the others

here is the full error:

Arduino:1.8.11 (Windows 10), Board:"Arduino Uno"

In file included from sketch\schuurtje_lezer.ino.cpp:1:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:54:17: error: expected unqualified-id before numeric constant

 #define SERIAL  0x0

                 ^

D:\data\persoonlijk\schuurtje_lezer\schuurtje_lezer.ino:3:5: note: in expansion of macro 'SERIAL'

 int SERIAL = 3;

     ^~~~~~

exit status 1
Fout bij het compileren voor board Arduino Uno

Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.

here is the full error:

Is that the full error message copied using the Copy error messages button in the IDE ?

If so then which errors have you fixed already ?
Please post your full program as it is now