function-definition is not allowed here before '{' token==> void timer_init() {

void timer_init() {
uint8_t sw_autoOFF = EEPROM.read(0); // read EEPROM "is activated or not stopping the car when losing connection"
if (sw_autoOFF == '1') { // if activated
char var_Data[3];
var_Data[0] = EEPROM.read(1);
var_Data[1] = EEPROM.read(2);
var_Data[2] = EEPROM.read(3);
autoOFF = atoi(var_Data) * 100; // variable autoOFF ms
}
else if (sw_autoOFF == '0') {
autoOFF = 999999;
}
else if (sw_autoOFF == 255) {
autoOFF = 2500; // if the EEPROM is blank, dafault value is 2.5 sec
}
currentTime = millis(); // read the time elapsed since application start
}

(deleted)

Hello 1_Need_Help,
Welcome to the forum.

I think you skipped an important part, which is to read 'how to use this forum - please read'. When you've done that you'll know what we need to stand a chance of giving you a helpful, friendly answer. Please modify your original post in line with the instructions.

Without that the answer you have above is about as good as you are likely to get.

The problem in the code is not shown in the code posted - which is why you should post complete sketches, not snippets. That said, when the nature of the problem is apparent from the error message, I don't think it's necessary to withhold that information until OP relents and posts the full sketch: That error indicates that you have the function definition somewhere that it is not allowed - usually inside another function due to misplaced {}'s - though it could also potentially be inside a set of parenthesis or []'s.

The autoformat (Ctrl+T) will format and indent code in a standardized way that makes problems like this easy to find.