SIM 800

hello my friends
I am trying to complete a project but i have problem with code.
I want to send SMS (pin code ex. 1234) to arduino and arduino must answer me with the values of the sensors.
So far i made to read sms to serial monitor but arduino doesnt answer to me.
here is the code

#include <gprs.h>
#include <SoftwareSerial.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
#define TIMEOUT    5000
float h = dht.readHumidity();
float t = dht.readTemperature();
GPRS gprs;
#include "HX711.h"
#define calibration_factor -17.2
#define DOUT 4
#define CLK 5
float value;
HX711 scale(DOUT, CLK);

void setup() {
  
  Serial.begin(9600);
   scale.set_scale(calibration_factor);
  scale.tare();  //Assuming there is no weight on the load cell at start up, this resets the output to 0
   value = scale.get_units(), 0;
  while (!Serial);
  dht.begin();
  Serial.println("scanninig");
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.println(" *C");
  Serial.print(value);
  Serial.println(" gramms");
  Serial.println("Starting SIM800 SMS Command Processor");
  gprs.preInit();
  delay(1000);

  while (0 != gprs.init()) {
    delay(1000);
    Serial.print("init error\r\n");
  }

  //Set SMS mode to ASCII
  if (0 != gprs.sendCmdAndWaitForResp("AT+CMGF=1\r\n", "OK", TIMEOUT)) {
    ERROR("ERROR:CNMI");
    return;
  }

  //Start listening to New SMS Message Indications
  if (0 != gprs.sendCmdAndWaitForResp("AT+CNMI=1,2,0,0,0\r\n", "OK", TIMEOUT)) {
    ERROR("ERROR:CNMI");
    return;
  }

  Serial.println("Init success");
}

//Variable to hold last line of serial output from SIM800
char currentLine[500] = "";
int currentLineIndex = 0;



void loop()
{
   value = scale.get_units(), 0;
  //If there is serial output from SIM800
  if (gprs.serialSIM800.available()) {
    char lastCharRead = gprs.serialSIM800.read();
    //Read each character from serial output until \r or \n is reached (which denotes end of line)
    if (lastCharRead == '\r' || lastCharRead == '\n') {
      String lastLine = String(currentLine);
      if (lastLine.startsWith("+CMT:")) {
        Serial.println(lastLine);
        nextLineIsMessage = true;
      }
      else if (lastLine.length() > 0) {
        if (nextLineIsMessage) {
          Serial.println(lastLine);
          //Read message content and set status according to SMS content
          if (lastLine.indexOf("MELI") >= 0) {
            gprs.serialSIM800.write("AT+CMGF=1\r\n");
            delay(1000);
            gprs.serialSIM800.write("AT+CMGS=\"+306985123172\"\r\n");
            delay(3000);
            float h = dht.readHumidity();
            float t = dht.readTemperature();
            gprs.serialSIM800.print("Humidity: ");
            gprs.serialSIM800.print(h);
            gprs.serialSIM800.print(" %");
            gprs.serialSIM800.println();
            gprs.serialSIM800.print("Temperature: ");
            gprs.serialSIM800.print(t);
            gprs.serialSIM800.print(" C");
            gprs.serialSIM800.println();
            gprs.serialSIM800.print("Weight: ");
            gprs.serialSIM800.print(value);
             gprs.serialSIM800.print();
            gprs.serialSIM800.print(" gramms");
            delay(1000);
            gprs.serialSIM800.write((char)26);
            delay(1000);
            Serial.println("SMS Sent!");
          }  nextLineIsMessage = false;
        }

      }
      //Clear char array for next line of read
      for ( int i = 0; i < sizeof(currentLine);  ++i ) {
        currentLine[i] = (char)0;
      }
      currentLineIndex = 0;
    } else {
      currentLine[currentLineIndex++] = lastCharRead;
    }
  }
}

can anyone help me???

i think the problem is somewere here because in tests i made, i send sms arduino print it to serial monitor but... no answer

 else if (lastLine.length() > 0) {
        if (nextLineIsMessage) {
          Serial.println(lastLine);
          //Read message content and set status according to SMS content
          if (lastLine.indexOf("MELI") >= 0) {
            gprs.serialSIM800.write("AT+CMGF=1\r\n");
            delay(1000);
            gprs.serialSIM800.write("AT+CMGS=\"+306985123172\"\r\n");
            delay(3000);
            float h = dht.readHumidity();
            float t = dht.readTemperature();
            gprs.serialSIM800.print("Humidity: ");
            gprs.serialSIM800.print(h);
            gprs.serialSIM800.print(" %");
            gprs.serialSIM800.println();
            gprs.serialSIM800.print("Temperature: ");
            gprs.serialSIM800.print(t);
            gprs.serialSIM800.print(" C");
            gprs.serialSIM800.println();
            gprs.serialSIM800.print("Weight: ");
            gprs.serialSIM800.print(value);
             gprs.serialSIM800.print();
            gprs.serialSIM800.print(" gramms");
            delay(1000);
            gprs.serialSIM800.write((char)26);
            delay(1000);
            Serial.println("SMS Sent!");
          }  nextLineIsMessage = false;
        }

It's unlikely that anyone will have your exact hardware setup (which you haven't posted) to run your code to find out what is wrong. I would recommend that you put a Serial.println before and after every "if" statement in your code so that you can trace the logic flow yourself. If you still can't work it out from that, at least you have some output to post with your code that will help someone debug it for you.

Serial.print("lastLine.length()=");
Serial.println(lastLine.length());
else if (lastLine.length() > 0) {
        Serial.print("nextLineIsMessage=");
        Serial.println(nextLineIsMessage);
        if (nextLineIsMessage) {
          Serial.print("lastLine=);
          Serial.println(lastLine);
          //Read message content and set status according to SMS content
          Serial.println("Checking last line for MELI");
          if (lastLine.indexOf("MELI") >= 0) {
            Serial.println("Found MELI");

This might seem time consuming, but if you consider how long you have already spent staring at the code the above will get you the answer in much less time. You can even leave these in your code and make them switchable with a:

#define DEBUG

#ifdef DEBUG
  Serial.println("Debugging statement goes here");
#endif