Help, this virtual comand BLYNK_WRITE(V7) don't works

I implemented one button to receive commands in my phone. But now when i compile this codig, show error in this part:

BLYNK_WRITE(V1)
{
  int value2 = param.asInt(); // Get value as integer
  if (value2 == 1) {
    ligado2 = ! ligado2;
    value2 = 0;


  }
}

variable or field 'BlynkWidgetWrite7' declared void

I don’t who resolve. It worked, it was a beauty.

You have a few syntax and apparent missing logic issues… but since we haven’t a clue what you are tying to accomplish, how can we properly advise?

Best I can do is point out is that this… ligado2 = ! ligado2; probably should be this… ligado2 = !ligado2; (no space between the logical not and the variable) if what you are doing is inverting the variable.