Trip doesnt name of type

hi all, i think my program has true all. but it happen to me.anyone know how to solve this?
error jpg:
image
program code:

// this sample code provided by www.programmingboss.com
#define RXp2 16
#define TXp2 17
String dataIn;
String dt[10];
int i;
int rpm = 0;
float cadence = 0;
float Odo = 0;
float Trip = 0;
float Speed = 0;
float torsi = 0;
float batt = 0;
float TripNow = 0;
float OdoNow = 0.0;
boolean parsing=false;
float keliling = 1.57;
int a = dt[0].toInt();
int b = dt[1].toInt();
float c = dt[2].toFloat();
int   d = dt[3].toInt();
float e = dt[4].toFloat();
float f = dt[5].toFloat();
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial2.begin (9600, SERIAL_8N1, RXp2, TXp2);
  dataIn="";
}
////////////////////////////////////////////////////////////////
//////////////////**LOOPING PROGRAM!!*//////////////////////////
///////////////////////////////////////////////////////////////
void loop() {
  serialtersedia();
    
  }

 void serialtersedia(){
  //   Serial.println("Message Received: ");
  if(Serial2.available()>0) {
    char inChar = (char)Serial2.read();
    dataIn += inChar;
    if (inChar == '\n') {
    parsing = true;
  }
}
 
if(parsing){
    parsingData();
    parsing=false;
    dataIn="";
  }
//   delay(500);
//    Serial.println(Serial2.readString());
 }

////////////////////////////////////////////////////////////////
//////////************ PARSING DATA***********//////////////////
////////////////////////////////////////////////////////////////
void parsingData(){
int j=0;
 
//kirim data yang telah diterima sebelumnya
Serial.print("data masuk : ");
Serial.print(dataIn);
Serial.print("\n");
 
//inisialisasi variabel, (reset isi variabel)
dt[j]="";
//proses parsing data
for(i=1;i<dataIn.length();i++){
//pengecekan tiap karakter dengan karakter (#) dan (,)
if ((dataIn[i] == '#') || (dataIn[i] == ','))
{
//increment variabel j, digunakan untuk merubah index array penampung
j++;
dt[j]="";       //inisialisasi variabel array dt[j]
}
else
{
//proses tampung data saat pengecekan karakter selesai.
dt[j] = dt[j] + dataIn[i];
}
}
 
  rpm = d / 360;
  cadence = b / 1920;
  batt = ((f*0.00489)*16.03);
  Speed = rpm * keliling * 3.6 / 60; //Sudah KM/H
  }
  Trip = d / 6 * keliling / 1000 / 3600;
  TripNow  = TripNow + Trip;
  OdoNow = OdoNow + Trip;
  torsi = c / 3.3 * 80;
//kirim data hasil parsing
Serial.print("PWM Motor : ");
Serial.println(a);
Serial.print("\n");
Serial.print("pedal count : ");
Serial.print(b);
Serial.print("\n");
Serial.print("torsi pedal : ");
Serial.print(c);
Serial.print("\n\n");
Serial.print("Kecepatan : ");
Serial.print(dt[3].toInt());
Serial.print("\n\n");
Serial.print("Arus baterai : ");
Serial.print(dt[4].toInt());
Serial.print("\n\n");
Serial.print("Voltase baterai : ");
Serial.print(dt[5].toInt());
Serial.print("\n\n");
delay(1500);
}
void pedalcount(){
  
}

void torsipedal(){
  
}

void kecepatan(){
}

void arusbatt(){
}
void voltbat(){
}
  





error code:

"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.49.0_x86__mdqgnx93n4wtt\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\ridho\\AppData\\Local\\Temp\\arduino_build_508640\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10815 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"esp32\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\ridho\\Documents\\ArduinoData\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32" "C:\\Users\\ridho\\AppData\\Local\\Temp\\arduino_build_508640\\sketch\\esp32_reciever.ino.cpp" -o "C:\\Users\\ridho\\AppData\\Local\\Temp\\arduino_build_508640\\sketch\\esp32_reciever.ino.cpp.o"

esp32_reciever:91:3: error: 'Trip' does not name a type

   Trip = d / 6 * keliling / 1000 / 3600;

   ^

esp32_reciever:92:3: error: 'TripNow' does not name a type

   TripNow  = TripNow + Trip;

   ^

esp32_reciever:93:3: error: 'OdoNow' does not name a type

   OdoNow = OdoNow + Trip;

   ^

esp32_reciever:94:3: error: 'torsi' does not name a type

   torsi = c / 3.3 * 80;

   ^

esp32_reciever:96:1: error: 'Serial' does not name a type

 Serial.print("PWM Motor : ");

 ^

esp32_reciever:97:1: error: 'Serial' does not name a type

 Serial.println(a);

 ^

esp32_reciever:98:1: error: 'Serial' does not name a type

 Serial.print("\n");

 ^

esp32_reciever:99:1: error: 'Serial' does not name a type

 Serial.print("pedal count : ");

 ^

esp32_reciever:100:1: error: 'Serial' does not name a type

 Serial.print(b);

 ^

esp32_reciever:101:1: error: 'Serial' does not name a type

 Serial.print("\n");

 ^

esp32_reciever:102:1: error: 'Serial' does not name a type

 Serial.print("torsi pedal : ");

 ^

esp32_reciever:103:1: error: 'Serial' does not name a type

 Serial.print(c);

 ^

esp32_reciever:104:1: error: 'Serial' does not name a type

 Serial.print("\n\n");

 ^

esp32_reciever:105:1: error: 'Serial' does not name a type

 Serial.print("Kecepatan : ");

 ^

esp32_reciever:106:1: error: 'Serial' does not name a type

 Serial.print(dt[3].toInt());

 ^

esp32_reciever:107:1: error: 'Serial' does not name a type

 Serial.print("\n\n");

 ^

esp32_reciever:108:1: error: 'Serial' does not name a type

 Serial.print("Arus baterai : ");

 ^

esp32_reciever:109:1: error: 'Serial' does not name a type

 Serial.print(dt[4].toInt());

 ^

esp32_reciever:110:1: error: 'Serial' does not name a type

 Serial.print("\n\n");

 ^

esp32_reciever:111:1: error: 'Serial' does not name a type

 Serial.print("Voltase baterai : ");

 ^

esp32_reciever:112:1: error: 'Serial' does not name a type

 Serial.print(dt[5].toInt());

 ^

esp32_reciever:113:1: error: 'Serial' does not name a type

 Serial.print("\n\n");

 ^

esp32_reciever:114:6: error: expected constructor, destructor, or type conversion before '(' token

 delay(1500);

      ^

esp32_reciever:115:1: error: expected declaration before '}' token

 }

 ^

exit status 1

'Trip' does not name a type

It looks to me like you've got badly matched { and } - your indentation makes the code hard to read ( and the forum'a formatting doesn't help...)

Try running the IDE's auto format tool.

If you got one of these,

then the matching } MUST be in the left-most column.

In future, please don't post pictures of code, or error messages - they serve very little purpose

You have not declared Serial2.

The following code is outside of your parsingData() function:

Trip = d / 6 * keliling / 1000 / 3600;
TripNow  = TripNow + Trip;
OdoNow = OdoNow + Trip;
torsi = c / 3.3 * 80;
//kirim data hasil parsing
Serial.print("PWM Motor : ");
Serial.println(a);
Serial.print("\n");
Serial.print("pedal count : ");
Serial.print(b);
Serial.print("\n");
Serial.print("torsi pedal : ");
Serial.print(c);
Serial.print("\n\n");
Serial.print("Kecepatan : ");
Serial.print(dt[3].toInt());
Serial.print("\n\n");
Serial.print("Arus baterai : ");
Serial.print(dt[4].toInt());
Serial.print("\n\n");
Serial.print("Voltase baterai : ");
Serial.print(dt[5].toInt());
Serial.print("\n\n");
delay(1500);
}

how to declare Serial2 ?? its like #define Serial2 ?

should i use #include <SofwareSerial.h> thenfor rx tx SoftwareSerial Serial2 (16,17);

should i use
#include <SofwareSerial.h>
// then declare rx tx
SoftwareSerial Serial2 (16,17);

Yes...assuming you are using pins 16 and 17 for rx/tx.