Get slides value from arduino code

How can i get the last value on an arduino variable i used on a slide widget when my arduino turn off and turn on ?.

i tried with these in setup but does not work:

Blynk.syncVirtual(V10);

BLYNK_WRITE(V10)
{ //slide Humedad

int pinValue = param.asInt(); // assigning incoming value from pin V10 to a variable
controlHumedad.onValue = pinValue ;

}

This is correct.

Blynk.syncVirtual(V10);

When you execute this command, it will trigger BLYNK_WRITE(V10).

Put it in your setup right after connecting to sync at boot.
Just dont put BLYNK_WRITE(V10) in setup as its a non-nested function… ie it cant be inside any other function.

void setup(){
  // connect to blynk, then right after put the syncVirtual command.
  Blynk.syncVirtual(V10);
}

BLYNK_WRITE(V10) { //slide Humedad
  int pinValue = param.asInt(); 
  controlHumedad.onValue = pinValue ;
}