How to fix the "too many arguments to function"

Hi, I'm needing assistance on how to fix this problem that is showing on my monitor.

it always shows this error:

"too many arguments to function 'long unsigned int millis()'"

this is the code and the error is "red-fonted" in red.

Thank You For Your Help.

//Switch 1 Variables
int state_s1 = 0; // declaring that case 0 is the main state to be in / "stand by"

int state_prev_s1 = 0; // start of main state

int pin_s1 = 2; // stores the pin that we are connected to with our switch

int val_s1 = 0; // stores whether the switch is high or low when we read it

unsigned long t_s1 = 0; // stores large numbers / timer(basically current time)

unsigned long t_0_s1 = 0; // time "0" = the start of time(basically previous time)

int led = 13; // the pin the LED is connected to

case 3: //WAIT (PRESENCE JUDGEMENT)
if (val_s1 = (digitalRead(2)));
t_s1 = millis(5000);

if
(if (val_s1 == HIGH); {state_s1;}
if (t_s1 - t_0_s1 > 5000){state_s1 = 4;})

else
(if (val_s1 == LOW); {state_s1;}
if (t_s1 - t_0_s1 > 5000){state_s1 = 0;})
break;

The millis() function does not take an argument.

Why do you pass an argument to millis()? What do you try to achieve with that code?

May i know what is an argument?

I achieve to have a 5 second timer when the sensor detects something.

An argument is a value that you pass to a function

As for using millis() for timing then take a look at Using millis() for timing. A beginners guide

I achieve to have a 5 second timer when the sensor detects something.

From your code, this is basically the line that achieves the 5 second delay

if (t_s1 - t_0_s1 > 5000){state_s1 = 4;})

TOPIC LOCKED

Sock puppet of time wasting Mr UNLUCKY who will receive a longer BAN.

Bob.