Random variables changing for no reason

Of course. Like I said, it is a mess and I don't have notations anywhere (probably not helping either), but here is the whole code in it's current state:

int pNum;
int X = -1;
int currentRound = 1;
int dealer = 0;
int currentBet = 1;
int totalPlayer = 0;
int C = 0;
int S;


String player[] = {"", "", "", "", "", "", ""};

int bet[] = {0, 0, 0, 0, 0, 0, 0};
int score[] = {0, 0, 0, 0, 0, 0, 0};


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

void loop() {
  Serial.println("How many players do we have?");
  playerCount();
  delay(1000);
  Serial.println("What are their names?");
  getNames();
  delay(1000);
  displayNames();
  delay(1000);
  for (currentRound = 1; currentRound < 8; currentRound++) {
    //    debug();
    Serial.println("Let's start the next round!");
    Serial.print("Round: ");
    Serial.print(currentRound);
    Serial.print("    ");
    Serial.print(player[dealer]);
    Serial.print(" deals: ");
    Serial.print(8 - currentRound);
    Serial.println(" cards");
    Serial.println();
    delay(1000);
    StartRound();
    Serial.println();
    delay(1000);
    //    debug();
    checkBets();
    delay(1000);
    displayScores();
    //    debug();
    resetBets();
    //    debug();
    setDealer();
    delay(1000);
    //    debug();
    delay(1000);
  }
  Serial.println("DONE");
  while (0 == 0) {
  }
}


void debug() {
  Serial.println();
  Serial.print("pNum= ");
  Serial.println(pNum);
  Serial.print("currentBet= ");
  Serial.println(currentBet);
  Serial.print("dealer= ");
  Serial.println(dealer);
  Serial.println();
}


void checkBets(){
  
}


void StartRound() {
  for (totalPlayer = 0; totalPlayer < pNum; totalPlayer++) {
resetBid:
    C = 0;
    Serial.print("What is ");
    Serial.print(player[currentBet]);
    Serial.println("'s bet?");
    if (totalPlayer == pNum - 1) {
      for (int i = 0; i < pNum; i++) {
        C = C + bet[i];
      }
      X = 8 - C - currentRound;
      if (X < 0) {
        Serial.println("You can bet anything!");
      }
      else {
        Serial.print("You cannot bet: ");
        Serial.println(X);
      }
    }
    do {
      if (Serial.available()) {
        S = Serial.parseInt();
        if (S > 8 - currentRound || S == X) {
          Serial.println("Bet is too high, too low, or you can't bet that");
          goto resetBid;
        }
        else {
          bet[currentBet] = S;
          currentBet++;
          break;
        }
      }
    } while (0 == 0);
    Serial.print(player[currentBet - 1]);
    Serial.print("'s bet is: ");
    Serial.println(bet[currentBet - 1]);

    if (currentBet == pNum) {
      currentBet = 0;
    }
  }
}

void setDealer() {
  dealer++;
  if (dealer >= pNum) {
    dealer = 0;
  }
  currentBet = dealer + 1;
  if (currentBet == pNum) {
    currentBet = 0;
  }
}


void displayScores() {
  for (int i = 0; i < pNum; i++) {
    Serial.print(player[i]);
    Serial.print("= ");
    Serial.print(score[i]);
    Serial.print("  |  ");
  }
  Serial.println();
  Serial.println();
}


void resetBets() {
  //  for (int x = 0; x < 8; x++) {
  //    bet[x] = 0;
  //    delay(10);
  //  }
  bet[0] = 0;
  bet[1] = 0;
  bet[2] = 0;
  bet[3] = 0;
  bet[4] = 0;
  bet[5] = 0;
  bet[6] = 0;
}


void displayNames() {
  for (int i = 0; i < pNum; i++) {
    Serial.print(player[i]);
    Serial.print("  |  ");
  }
  Serial.println();
  Serial.println();
}


void getNames() {
  for (int i = 0; i < pNum; i++) {
    while (0 == 0) {
      if (Serial.available()) {
        player[i] = Serial.readString();
        Serial.print("Player ");
        Serial.print(i + 1);
        Serial.print(": ");
        Serial.println(player[i]);
        break;
      }
    }
  }
  Serial.println();
}


void playerCount() {
  pNum = 0;
  while (pNum == 0) {
    if (Serial.available()) {
      X = Serial.parseInt();
      if (X > 1 && X < 8) {
        pNum = X;
        Serial.print("Player count set to: ");
        Serial.println(pNum);
        Serial.println();
      }
      else {
        Serial.println("Players too high or too low!");
        Serial.println();
      }
    }
  }
  X = -1;
}

In regards to the memory issue, I don't know if that is the cause or how I would fix it if it was. It says I'm only using about a 1/5 of the memory with this current code. If you really think it is a memory issue, I may need some guidance or a source that will help me solve this issue. I am still a bit of a novice when it comes to coding, so this code probably has many ways it could be optimized or there are things I'm doing that more experienced programmers would tell me are "no-no's".

I am currently using an arduino nano, since all I'm really doing is some processing and storage of numbers and only sending them to the SM; and not connecting anything to the arduino itself (ie LEDs or buttons)

If it helps make sense of the code, the point of the card game is this: you get 7 cards round 1, 6 cards round 2, ect ect. There is a trump card and you must make bets 0-total cards in play. if you get the bets you made, you get 10 points + the amount you bid; if you don't, you get only the amount of "tricks" you got. (ie I bid 2, I got 2, so I get 12 points, the other guy bid 2, he got 1, so he gets 1, ect)