millis makes the led stay on

Hey all its me again asking another question, anyways I am facing a problem where im trying to hookup a yellow led as an status led that blinks every 1 second however when I use the millis instead of the the delay so it dosent interrupt the program. The millis function dosent work and dosent make the led blink in my program but it works if I open the arduino blinkwithoutdelay sketch can anyone please tell me why its not working. Thankyou.

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
int enableallquestions = 0; //Disable questions change the 1 to 0 (DEBUGGING ONLY)
int enablebuttondebugging = 0;
const int redled = 13;
const int blueled = 12;
const int greenled = 11;
const int statusled = 7;
const int falsebutton = 10;
const int truebutton = 9;
const int buzzer = 8;
int falsebuttonval;
int truebuttonval;
void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  pinMode(redled, OUTPUT);
  pinMode(greenled, OUTPUT);
  pinMode(blueled, OUTPUT);
  pinMode(statusled, OUTPUT);
  pinMode(buzzer, OUTPUT);
  pinMode(falsebutton, INPUT_PULLUP);
  pinMode(truebutton, INPUT_PULLUP);
}
void maingamecode() {
  boolean questiondone = false;
  while (questiondone == false) {
    falsebuttonval = digitalRead(falsebutton);
    truebuttonval = digitalRead(truebutton);
    statusledfunc();
    lcd.setCursor(0, 0);
    lcd.print(""); //Question 1
    if (truebuttonval == 0) {
      digitalWrite(greenled, HIGH);
      delay(3000);
      for (int x = 0; x < 5; x++) {
        digitalWrite(greenled, HIGH);
        delay(100);
        digitalWrite(greenled, LOW);
        delay(100);
        digitalWrite(blueled, HIGH);
        delay(100);
        digitalWrite(blueled, LOW);
        delay(100);
        digitalWrite(redled, HIGH);
        delay(100);
        digitalWrite(redled, LOW);
        delay(100);
        digitalWrite(redled, HIGH);
        delay(100);
        digitalWrite(redled, LOW);
        delay(100);
        digitalWrite(blueled, HIGH);
        delay(100);
        digitalWrite(blueled, LOW);
        delay(100);
        digitalWrite(greenled, HIGH);
        delay(100);
        digitalWrite(greenled, LOW);
        delay(100);
      }
    }
  }
  if (enableallquestions == 1) {
  }
}

void testing() {
}
void statusledfunc() {
  int ledstate = LOW;
  unsigned long previousmillis = 0;
  const long interval = 1000;
  unsigned long currentmillis = millis();
  for ( ; ; ) {
    if (currentmillis - previousmillis >= interval) {
      previousmillis = currentmillis;
      if (ledstate == LOW) {
        ledstate = HIGH;
      }
      else {
        ledstate = LOW;
      }
      digitalWrite(statusled, ledstate);
    }
  }
}
void loop() {
  maingamecode();
  //testing();
  if (enablebuttondebugging == 1) {
    falsebuttonval = digitalRead(falsebutton);
    truebuttonval = digitalRead(truebutton);
    Serial.print("false button value is: ");
    Serial.println(falsebuttonval);
    delay(1000);
    Serial.print("true button value is: ");
    Serial.println(truebuttonval);
    delay(1000);
  }
}

Where in your infinite loop do you update the time?

what do you mean?
im assuming your talking about this?

void statusledfunc() {
  int ledstate = LOW;
  unsigned long previousmillis = 0;
  const long interval = 1000;
  unsigned long currentmillis = millis();
  for ( ; ; ) {
    if (currentmillis - previousmillis >= interval) {
      previousmillis = currentmillis;
      if (ledstate == LOW) {
        ledstate = HIGH;
      }
      else {
        ledstate = LOW;
      }
      digitalWrite(statusled, ledstate);
    }
  }
}

Yes, the infinite loop in that function

Aren't I updating the time in the variables in the statuses function because I'm storing the value of millis in the variable then the if is putting the current value into previous then change the led state?

currentMillis never gets updated in the infinite loop

What would be the fix to update Millis in the infinite loop?

Thanks

Put the assignment that you currently do outside the infinite loop inside the infinite loop.

Which then raises the question, why is there an infinite loop?

Oh that makes sense I'm still learning,

Yes I know the infinite loop I made that because I'm calling it in the maingame function. Thankyou for the answer and hope U have a good day or night.