Decimals in variable int

Hello everyone. I have a SCADA with two thermocouples and a pH meter and I have a problem with the pH probe. The SCADA follows the ModBus RTU protocol. The probe is connected to Arduino via RX3 and TX3.
The problem comes when I want to read the value that is String and then convert it to Int. It removes the decimals.
I had thought about multiplying it by 100 before converting it and then dividing it so that I had the two decimal places when I showed it in SCADA.
Something similar to “sensorstring = Serial3.readStringUntil (13) * 100;”
and then at the time of showing it divide it like this “regs [pH_1] = (sensorstring.toInt () / 100);”
But I get an error when multiplying it. Is it because you can not, or because I do it wrong? I ask for help please. Thank you very much.
I leave the code:

#include <Adafruit_MAX31856.h>
Adafruit_MAX31856 max_A = Adafruit_MAX31856(10, 11, 12, 13);
Adafruit_MAX31856 max_B = Adafruit_MAX31856(9, 11, 12, 13); 
String termoparstring_A = "";
String termoparstring_B = "";  
String inputstring = "";   
String sensorstring = "";
String inputstring1 = "";  
String sensorstring1 = "";  
boolean input_string_complete = false;                
boolean sensor_string_complete = false;  
boolean input_string_complete1 = false;                
boolean sensor_string_complete1 = false;       
void configure_mb_slave(long baud, char parity, char txenpin);

int update_mb_slave(unsigned char slave, int *regs, unsigned int regs_size);
enum {
        COMM_BPS = 9600, 
        MB_SLAVE = 1,	 
        PARITY = 'n'     
};

enum {        
        T_1,
        T_2,
        pH_1,  
        MB_REGS	 	 
};

int regs[MB_REGS];
unsigned long wdog = 0;         
unsigned long tprev = 0;         

void setup() {
          configure_mb_slave(COMM_BPS, PARITY, 0);
          Serial3.begin(9600);
          Serial1.begin(9600);
         inputstring.reserve(30);                            
         sensorstring.reserve(60);
         inputstring1.reserve(30);                            
        sensorstring1.reserve(60);
        max_A.begin();
        max_A.setThermocoupleType(MAX31856_TCTYPE_K);
        max_B.begin();
        max_B.setThermocoupleType(MAX31856_TCTYPE_K);
}
                          
void serialEvent() {                                  
  inputstring = Serial1.readStringUntil(13);          
  input_string_complete = true;  
                
}


void serialEvent3() {                                 
  sensorstring = Serial3.readStringUntil(13);         
  sensor_string_complete = true; 
                      
}

void loop() {
        update_mb_slave(MB_SLAVE, regs, MB_REGS);
        termoparstring_A =(max_A.readThermocoupleTemperature());
        termoparstring_B =(max_B.readThermocoupleTemperature());
        if (sensor_string_complete == true) {  
        regs [T_1] = (max_A.readThermocoupleTemperature()*100);         // ec. del sensor y *100.0 para que aparezcan decimales en el SCADA 
        regs [T_2] = (max_B.readThermocoupleTemperature()*100);         // ec. del sensor y *100.0 para que aparezcan decimales en el SCADA 
        regs [pH_1] = (sensorstring.toInt()/100); 
    
      }
  sensorstring = "";
  sensorstring1 = "";                                  
  sensor_string_complete = false;
  sensor_string_complete1 = false;     
                                     
  }

Whatever else is going on this

regs [pH_1] = (sensorstring.toInt () / 100);

is not going to work because the regs[] array is declared as int

UKHeliBob: Whatever else is going on this

regs [pH_1] = (sensorstring.toInt () / 100);

is not going to work because the regs[] array is declared as int

The problem is that for SCADA to work I have to transform it into INT. Regs does not work with String. That's why I wanted to know if it could be some form I can multiply the value it gives me by 100 before transforming it to int

You can certainly multiply a float value by 100 to turn it into an int and divide it by 100 later to turn it into a float again but what you can’t do is to put a float into an int array and expect it to be saved as a float

As to the original problem, you are trying to multiply a String by 100, which has no meaning.

You could, perhaps
Read the String
Convert it to an int
Divide it by 100

How could I store the values that sensorstring read as String to a Float and then operate on that Float?
I tried it. Sorry if is wrong:

void serialEvent4(){
__ sensorstring.toFloat()*100;__

and
regs [pH_1] = (sensorstring.toInt()/100);

#include <Adafruit_MAX31856.h>
Adafruit_MAX31856 max_A = Adafruit_MAX31856(10, 11, 12, 13);
Adafruit_MAX31856 max_B = Adafruit_MAX31856(9, 11, 12, 13); 
String termoparstring_A = "";
String termoparstring_B = "";  
String inputstring = "";   
String sensorstring = "";
String inputstring1 = "";  
String sensorstring1 = ""; 
boolean input_string_complete = false;                
boolean sensor_string_complete = false;  
boolean input_string_complete1 = false;                
boolean sensor_string_complete1 = false;       
void configure_mb_slave(long baud, char parity, char txenpin);

int update_mb_slave(unsigned char slave, int *regs, unsigned int regs_size);
enum {
        COMM_BPS = 9600, 
        MB_SLAVE = 1,	 
        PARITY = 'n'     
};

enum {        
        T_1,
        T_2,
        pH_1,  
        MB_REGS	 	 
};

int regs[MB_REGS];
unsigned long wdog = 0;         
unsigned long tprev = 0;         

void setup() {
          configure_mb_slave(COMM_BPS, PARITY, 0);
          Serial3.begin(9600);
          Serial1.begin(9600);
         inputstring.reserve(30);                            
         sensorstring.reserve(60);
         inputstring1.reserve(30);                            
        sensorstring1.reserve(60);
        max_A.begin();
        max_A.setThermocoupleType(MAX31856_TCTYPE_K);
        max_B.begin();
        max_B.setThermocoupleType(MAX31856_TCTYPE_K);
}
                          
void serialEvent() {                                  
  inputstring = Serial1.readStringUntil(13);          
  input_string_complete = true;  
                
}


void serialEvent3() {                                 
  sensorstring = Serial3.readStringUntil(13);         
  sensor_string_complete = true; 
                      
}
void serialEvent4(){
      sensorstring.toFloat()*100;
      
}

void loop() {
        update_mb_slave(MB_SLAVE, regs, MB_REGS);
        termoparstring_A =(max_A.readThermocoupleTemperature());
        termoparstring_B =(max_B.readThermocoupleTemperature());
    
        if (sensor_string_complete == true) {  
        regs [T_1] = (max_A.readThermocoupleTemperature()*100);         // ec. del sensor y *100.0 para que aparezcan decimales en el SCADA 
        regs [T_2] = (max_B.readThermocoupleTemperature()*100);         // ec. del sensor y *100.0 para que aparezcan decimales en el SCADA 
        regs [pH_1] = (sensorstring.toInt()/100); 
    
      }
  sensorstring = "";
  sensorstring1 = "";                                  
  sensor_string_complete = false;
  sensor_string_complete1 = false;     
                                     
  }

Try the 3 steps that I outlined in post #3 Do not try to combine the steps Print the intermediate results

What do you see ?

A bigger question is, do you need to use Strings at all ? Could you use strings (zero terminated arrays of chars) which are seen as a better alternative because they do not cause memory fragmentation.

Thank you so much!!! It´s works fine!!

sensorstring.toFloat()*100; sensorstring.toInt()/100;

regs [pH_1] = (sensorstring.toFloat()*100);

Why divide by 100 to create a float then multiply by 100 to get the integer back ?