Arduino Darts Game - Stuck on player cound choosing

I have a broken darts machine and i'm reworking it with the Arduino. And i'm stuck. I programmed all the match, the player skipping etc. but i just dont know how to to the following:

  1. Stop the code
  2. Wait for serial input of number from 1 to 4
  3. write the given number to the BROJIGRACA integer
  4. continue with the code

Here's my stuff

int RX = 0;
int POGODAK = 0;
int SKOR1 = 301;
int SKOR2 = 301;
int SKOR3 = 301;
int SKOR4 = 301;
int BACANJE = 0;
int IGRAC = 1;
int GOTOVO = 0;
int BROJIGRACA = 4;
void setup() {
  PODESAVANJE();
}
void loop() {
  while (CEKAJ_PLOCU()) {
  OCITAVAJ();
  }
}
int PODESAVANJE() {
  Serial.begin(9600);
  if (BROJIGRACA == 1) {
    Serial.println("Pocinjem igru, 1 igrac...");
    ISPISI_SKOR1();
  }
  else if (BROJIGRACA == 2) {
    Serial.println("Pocinjem igru, 2 igraca...");
    ISPISI_SKOR2();
  }
  else if (BROJIGRACA == 3) {
    Serial.println("Pocinjem igru, 3 igraca...");
    ISPISI_SKOR3();
  }
  else if (BROJIGRACA == 4) {
    Serial.println("Pocinjem igru, 4 igraca...");
    ISPISI_SKOR4();
  }
}
int CEKAJ_PLOCU() {
  if (GOTOVO == 0) {
    if (Serial.available() > 0) {
    RX = Serial.read();
    }
  }
}
int OCITAVAJ() {
  if (RX == 32) {
    PRESKOCI();
  }
  if (RX == 97) {
    POGODAK = 60;
    RACUNAJ();
  }
  if (RX == 115) {
    POGODAK = 1;
    RACUNAJ();
  }
}
int RACUNAJ() {
  if (IGRAC == 1) {
    SKOR1 = SKOR1 - POGODAK;
    if (SKOR1 == 0) {
     Serial.print("Igra je gotova! Pobjedio je igrac 1");
   }
   else if (SKOR1 < 1) {
     Serial.println("Skor ne moze biti manji od 0!");
     SKOR1 = SKOR1 + POGODAK;
     ISPISI_SKOR1();
     BACENO();
   }

   else {
     ISPISI_SKOR1();
     BACENO();
   }
  }
  else {
    RACUNAJ2();
  }
}
int RACUNAJ2() {
  if (IGRAC == 2) {
    SKOR2 = SKOR2 - POGODAK;
    if (SKOR2 == 0) {
     Serial.print("Igra je gotova! Pobjedio je igrac 2");
   }
   else if (SKOR2 < 1) {
     Serial.println("Skor ne moze biti manji od 0!");
     SKOR2 = SKOR2 + POGODAK;
     ISPISI_SKOR1();
     BACENO();
   }

   else {
     ISPISI_SKOR1();
     BACENO();
   }
  }
  else {
    RACUNAJ3();
  }
}
int RACUNAJ3() {
  if (IGRAC == 3) {
    SKOR3 = SKOR3 - POGODAK;
    if (SKOR3 == 0) {
     Serial.print("Igra je gotova! Pobjedio je igrac 3");
   }
   else if (SKOR3 < 1) {
     Serial.println("Skor ne moze biti manji od 0!");
     SKOR3 = SKOR3 + POGODAK;
     ISPISI_SKOR1();
     BACENO();
   }

   else {
     ISPISI_SKOR1();
     BACENO();
   }
  }
  else {
    RACUNAJ4();
  }
}
int RACUNAJ4() {
  if (IGRAC == 4) {
    SKOR4 = SKOR4 - POGODAK;
    if (SKOR4 == 0) {
     Serial.print("Igra je gotova! Pobjedio je igrac 4");
   }
   else if (SKOR4 < 1) {
     Serial.println("Skor ne moze biti manji od 0!");
     SKOR4 = SKOR4 + POGODAK;
     ISPISI_SKOR1();
     BACENO();
   }

   else {
     ISPISI_SKOR1();
     BACENO();
   }
  }
  else {
    IGRAC = 1;
    RACUNAJ();
  }
}
int BACENO() {
  BACANJE = BACANJE + 1;
  if (BACANJE == 3) {
    Serial.println("Sljedeci igrac...");
    IGRAC = IGRAC + 1;
    ISPISI_SKOR1();
    BACANJE = 0;
    CEKAJ_PLOCU();
  }
  
}
int ISPISI_SKOR1() {
   Serial.print(SKOR1);
}
int ISPISI_SKOR2() {
   Serial.print(SKOR1) && Serial.print("  ") && Serial.print(SKOR2);
}
int ISPISI_SKOR3() {
   Serial.print(SKOR1) && Serial.print("  ") && Serial.print(SKOR2) && Serial.print("  ") && Serial.print(SKOR3); 
}
int ISPISI_SKOR4() {
   Serial.print(SKOR1) && Serial.print("  ") && Serial.print(SKOR2) && Serial.print("  ") && Serial.print(SKOR3) && Serial.print("  ") && Serial.print(SKOR4) && Serial.println("  "); 
}
int PRESKOCI() {
    Serial.println("Sljedeci igrac...");
    IGRAC = IGRAC + 1;
    ISPISI_SKOR1();
    BACANJE = 0;
    CEKAJ_PLOCU();
}
  1. Stop the code

When, where, and why?

  1. Wait for serial input of number from 1 to 4
while(Serial.available() == 0)
{
   // do nothing
}
int num = Serial.read() - '0';
  1. write the given number to the BROJIGRACA integer
BROJIGRACA = num;

Stop it before the main setup stage to set vital initial integer BROJIGRACA, and i tried that code already, terminal stays blank

I imagine it should. You would not have written anything through serial at that point, and the controller is waiting for information to be read.

ApexM0Eng:
I imagine it should. You would not have written anything through serial at that point, and the controller is waiting for information to be read.

That was it. I was doing

Serial.println("Choose number of players...");

before the code above.

Thanks ya all