comparing string from GSM

this is my code but the program did not compare the string value from GSM with the string that i initialized earlier.

every msg that i sent will enter the "else" loop.
not the
if(stringOPEN == getSMS)
and
else if (stringCLOSE == getSMS)

someone please help

baahtakjadi2.ino (2.82 KB)

google for the strcmp() function. or stricmp() for case insensitive

if (stricmp("Open", GSMSTR) == 0) ... etc

note it works on char array's not on String class objects.

  char stringSMS;

I'll bet you have code that has stuff like

int floatVal;
float charData;
char servoInstance;

and other crap, too.
A single char is NOT a string. It is not a String, either.

Get rid of ALL Strings from your code.

Collect the data in an array of chars, keeping the array NULL terminated.

Put this project away until you have much more familiarity with C. Jumping into the deep end is NOT the way to learn.