Problem with the virtual PIN read

I have problelm with my project “Control speed motor”
This is my code

#define BLYNK_PRINT Serial
    #include <ESP8266WiFi.h>
    #include <BlynkSimpleEsp8266.h>
    #define IN1 D1

    char auth[] = "56VAm5a00DBEy_-KTX2rlLfBUAwj1ZFQ"; // Nhập AuthToken của bạn 
    char ssid[] = "NhatDuong"; // 
    char pass[] = "23456789"; // Nhập password WiFi

    int swith;
    int trl;
    int spe; 
    BLYNK_CONNECTED() {
      Blynk.syncAll();
      BLYNK_WRITE(V0); {
        int swith = param.asInt();
      }
            if(swith == 1); {
        BLYNK_WRITE(V1); {
       int trl = param.asInt(); 
        }
        BLYNK_WRITE(V3); {
       int spe = param.asInt();
        } 
        analogWrite(IN1, (spe + trl)* 10 );
        }
        else if (swith == 0); {
            analogWrite (IN1, 0) ;}
     }
    }                                                                                                                                                                                                                                
    void setup() {
      Serial.begin(9600);
      pinMode(IN1, OUTPUT);
      Blynk.begin(auth, ssid, pass);
    }
    void loop() {
      Blynk.run();
      
    }

When I run the program, the following error message appears

Not used: C:\Users\DAI\Documents\Arduino\libraries\Blynk
exit status 1
'param' was not declared in this scope

I don’t understand this error and try to edit my code but it doesn’t work.
Pleas help me !

I don’t know where you got this kind of syntax from. It’s invalid.
Please follow examples provided with the blynk library.

Try this…

BLYNK_CONNECTED()
{
  Blynk.syncAll();
}


BLYNK_WRITE(V0)
{
  int swith = param.asInt();
  if(swith == 1)
  {
    // do something in here, maybe this..
    // analogWrite (IN1, 1) ; 
  }
  else if (swith == 0)
  {
    analogWrite (IN1, 0) ;
  }
}


BLYNK_WRITE(V1)
{
  int trl = param.asInt();  // Note that trl is a LOCAL variable!
}


BLYNK_WRITE(V3)
{
  int spe = param.asInt();
  
  analogWrite(IN1, (spe + trl)* 10 ); // trl is local to BLYNK_WRITE(V1), so you'll get an error or an unexpected result
}

The way that you lay out your code makes a big difference to its readability. You also need to learn more about C++ syntax, and variable scope.

Pete.

remove the semicolon

Thank you pro ! I will try your way again.