How to receive/detect sms messages

I am running an Arduino UNO with a 3G GPRS shield. All was finally working as it should with connection, etc. I am trying to add remote control via sms to turn the alarm on or off. I am not comfortable with the #include(s) or libraries to know if that is where my problem lies. The error I am now getting is: “‘class SMSGSM’ has no member named ‘available’”. I have seen similar sketches where the sms.available seems to work fine, but probably a different board/library. My code follows. Appreciate any help in troubleshooting. Thanks.

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
//To change pins for Software Serial, use the two lines in GSM.cpp.
boolean started = false;
int PIR_SensorPin = 2;
int Alarm_OutPin = 3;//red
int Light_OutPin = 6;//green
int sensor_count;
int alarm_count;

void setup() {
  Serial.begin(9600);  //Establish Serial connection.
  pinMode(Alarm_OutPin, OUTPUT);   //Set pinMode.
  pinMode(Light_OutPin, OUTPUT);   //Set pinMode.
  pinMode(PIR_SensorPin, INPUT);   //Set pinMode.
  digitalWrite (3, LOW); //Set output pins to LOW for start.
  digitalWrite (6, LOW); //Set output pins to LOW for start.
  Serial.println("GSM Shield testing."); //Serial message that GSM shield is starting up
  if (gsm.begin(4800)) {    //Set GSM shield to recommended 4800 baud rate.
    Serial.println("\nstatus = READY");
    //  boolean started = true;
  else Serial.println("\nstatus = IDLE"); {
  if (started) {
    //Enable this two lines if you want to send an SMS.
    (sms.SendSMS("**********", "Studio Alarm Ready"));
  }  Serial.println("\nSMS sent OK");

void loop() {
  //reading messages
  if (sms.available()) // if there are SMS on the SIM card
    x++; //message counter adds one
    sms.remoteNumber(remoteNumber, 20);
    //Show the message on monitor
    Serial.println("Messages received from");
    Serial.println(remoteNumber); //Prints senders number on the serial monitor

    while (c = {
      if (c == 'ON')
        digitalWrite(13, HIGH);
      else if (c == 'OFF')
        digitalWrite(13, LOW);
      String nextChar = String (c);
      String Mess = (lastMess + nextChar);
      lastMess = Mess;
      /* collects one digit of the messages at time and stores it in the variable c.
        This while loop builds a String variable "lastMess" from each byte in the messages for displaying.
    Serial.println(lastMess); // prints the whole messages on the monitor and LCD screen
  }//end for
  sms.flush(); //discards the SMS message

void check() {
  if ((digitalRead (PIR_SensorPin) == HIGH)) {
  else {
    Serial.println("Nothing detected");
    delay (5000);

void alarm() {
  if (started) {
    (sms.SendSMS("**********", "***Motion Detected in Studio!***"));
  } Serial.println("Motion detected");
  for (alarm_count = 0; alarm_count < 10; alarm_count++) { //Cycle outputs if triggered
    digitalWrite (Alarm_OutPin, HIGH); delay (500); //On/Off/On/Off
    digitalWrite (Alarm_OutPin, LOW);
    digitalWrite (Light_OutPin, HIGH); delay (500);
    digitalWrite (Alarm_OutPin, LOW);
    digitalWrite (Light_OutPin, LOW); //End by turning off light