solution for String addition problems

Good day! I am having problems with adding single characters to the the strings i have. At first my codes work well adding the character from smsbuffer to the intString and char string. my serial monitor would show:
XXXXXXXXXXX
On 02

COMMAND GRABBED:
ON
NUMBER OF MINUTE(S):
2
IN MILLISECONDS:
300000

but after I remove the comment on sms,SendSMS(); the serial monitor would show:
XXXXXXXXXXX
On 02

COMMAND GRABBED:
O
NUMBER OF MINUTE(S):
0 (this is zero)
IN MILLISECONDS:
0

It would only show the first character that was put inside the string. Can any one help me?
here are my codes:

#include "SIM900.h"
#include <SoftwareSerial.h>
//#include<Servo.h>

#include "sms.h"
SMSGSM sms;
//Servo myservo;
/****************************************************************************************************/
boolean GSMactive = false;
char smsbuffer[160];
char n[20];
char remoteNumber[20] = "XXXXXXXXXX";

String intString = "";
String charString = "";

int minute = 0;

unsigned long int timeMillis = 0;
unsigned long int timeExact = 0;
unsigned long int activeRead = 0;
unsigned long int startRead = 0;

unsigned long int timeLeft = 0;
unsigned long int runTime = 0;

boolean timerActive = false;
boolean finalCount = false;
/****************************************************************************************************/
void setup(){
  Serial.begin(9600);
  //switchOn();
  //switchOff();
  //pwrOn();
  Serial.println("DEVICE LOADING...");
  if(gsm.begin(9600)){
    Serial.println("STATUS = DEVICE READY");
    GSMactive = true;
  }
  else Serial.println("STATUS = DEVICE IDLE");
  if(GSMactive){
    if (sms.SendSMS("XXXXXXXXXXX", "on 02"))
      Serial.println("\nSMS sent OK");
  }
}
/****************************************************************************************************/
void loop(){
  intString = String("");
  charString = String("");
  minute = 0;
  activeRead = millis();
  
  if(timerActive){
    runTime = activeRead - startRead;
    timeLeft = timeExact - runTime;
    Serial.println("TOTAL RUN TIME:");
    Serial.println((float)runTime/60000);
    Serial.println("TIME REMAINING:");
    Serial.println((float)timeLeft/60000);
    delay(900);
  }
  
  if(timeLeft < 60000 && timerActive){
    //if(GSMactive)
    Serial.println("LESS THAN A MINUTE LEFT");
    finalCount = true;
    GSMactive = false;
  }
  
  if(finalCount && timeLeft < 1000){
    Serial.println("TIME UP!");
    timerActive = false;
    finalCount = false;
    GSMactive = true;
    //switchOff();
    //sms.SendSMS(remoteNumber, "TIMER OUT. DEVICE DEACTIVATED!");
  }
  
  if(GSMactive){
    if(gsm.readSMS(smsbuffer, 160, n, 20))
    {
      Serial.println(n);
      Serial.println(smsbuffer);
      
      for(int index = 0; smsbuffer[index] != '\0'; index++){
        int thisChar = smsbuffer[index];
        if(isDigit(thisChar)){
          intString += (char)thisChar;
        }
        if(isAlpha(thisChar)){
          charString += (char)thisChar;
        }
        if(isPunct(thisChar)){
          charString += (char)thisChar;
        }
      }
      charString.toUpperCase();
      minute = intString.toInt();
      timeMillis = 0;
      for(int x = 0; x < minute; x++){
        for(int y = 0; y < 60; y++){
          timeMillis = timeMillis + 1000;
        }
      }
      Serial.println("COMMAND GRABBED:");
      Serial.println(charString);
      Serial.println("NUMBER OF MINUTE(S):");
      Serial.println(minute);
      Serial.println("IN MILLISECONDS:");
      Serial.println(timeMillis);
    }
    if(charString == "ON"){
      Serial.println("TURNING DEVICE ON...");
      if(minute <= 15 && minute > 0){
        startRead = millis();
        timerActive = true;
        timeExact = timeMillis;
        //switchOn();
        //sms.SendSMS(remoteNumber, "DEVICE ACTIVATED!");
      }
      else Serial.println("ERROR!");
    }
    if(charString == "OFF"){
      Serial.println("TURNING DEVICE OFF...");
      if(timerActive){
        timerActive = false;
        //switchOff();
        //sms.SendSMS(remoteNumber, "DEVICE DEACTIVATED!");
      }
      else Serial.println("ERROR!");
    }
    //if(charString != "ON" && charString != "OFF"){
    //  Serial.println("COMMAND NOT SUPPORTED.");
    //}
  }
   
  Serial.println("LOOP ENDED...");
}
/****************************************************************************************************/
/*void switchOn(){
  myservo.attach(6);
  for(int pos = 0; pos < 180; pos++){
    myservo.write(pos);
    delay(15);
  }
  myservo.detach();
  return;
}*/
/****************************************************************************************************/
/*void switchOff(){
  myservo.attach(6);
  for(int pos = 180; pos >= 1; pos--){
    myservo.write(pos);
    delay(15);
  }
  myservo.detach();
  return;
}*/
/****************************************************************************************************/
/*void pwrOn()
{
 pinMode(9, OUTPUT); 
 digitalWrite(9,LOW);
 delay(1000);
 digitalWrite(9,HIGH);
 delay(2000);
 digitalWrite(9,LOW);
 delay(3000);
 return;
}*/

I’d look to move more of your constant strings (Is your shift key sticky?) into flash, using the F() macro.

Please remove any irrelevant, commented-out code before posting.

timeMillis = 0;
      for(int x = 0; x < minute; x++){
        for(int y = 0; y < 60; y++){
          timeMillis = timeMillis + 1000;
        }
      }

is just a long-winded way of writing timeMillis = minute * 60UL * 1000UL;, isn’t it?

Best help I can give you is that when it comes to Arduinos, don't use C++ String objects. Use C string arrays instead.

Problem is that I don't know of any good Arduino C string tutorials. There are C string tutorials for regular C that does not use setup() and loop() but rather main(), but I don't know how new you are to programming and that might confuse you more than this post might already confuse you. Okay, the sentence almost confuses me!

Maybe some else can steer you on this before someone tells you there's no problems with String, uh huh. If you do write more than trivial code, using String will bite you unless you're very careful and good luck with that!

I won't work with String so either way you will get more help.

thanks for the suggestion. i've already solve the problem. i changed the intString  = String(""); to intString = ""; same goes for the charString.