Help on "expected unqualified-id before '.' token"

I can’t seem to find a way to fix this code:
#include <SPI.h>
#include <TMRpcm.h>
#include <GSM.h>
#include <SD.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd01(10, 9, 8, 7, 6, 5); // change later
void setup() {
int humi01 = A0; int flame01 = A1; int agas01 = A2; int motion01 = A3; int smoke01 = A4; int carbonM01 = A5;
pinMode (A0, OUTPUT);
pinMode (A1, INPUT);
pinMode (A2, INPUT);
pinMode (A3, INPUT);
pinMode (A4, INPUT);
pinMode (A5, INPUT);
analogWrite(2, 50);
lcd01.begin(16, 2);
SD.begin();
#define PINNUMBER “xxxx” // initialize the library instance
GSM gsmAccess(true);
TMRpcm.audio;
GSM_SMS sms;
}

void loop() {
int humi01; int Rhumi; int Thumi;
int sensorValue0;
sensorValue0 = analogRead(A0);
Rhumi = sensorValue0 / 10;
Thumi = sensorValue0 / 24;
if (humi01 > 75){ //Change value later.
lcd01.setCursor(0, 1);
lcd01.print(“Wet Warning!”);
GSM.beginSMS(xxxxxxxxxx);
sms.print(“A Humidity Warning Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Wet_Warning.wav”);
}
else if (humi01 < 0) {
lcd01.setCursor(0, 1);
lcd01.print(“Dry Warning!”);
GSM.beginSMS(xxxxxxxxxx);
GSM.print(“A Dryness Warning Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Dry_Warning.wav”);
}
else {
lcd01.setCursor(0, 0);
lcd01.print(Rhumi);
delay(1000);
lcd01.setCursor(4, 0);
lcd01.print(Thumi);
delay(1000);
}

int flame01; int sensorValue1;
sensorValue1 = analogRead(A1);
if(sensorValue1>760) { //Change value later.
lcd01.setCursor(0, 1);
lcd01.print(“Fire Warning!”);
GSM.beginSMS(xxxxxxxxxx);
GSM.print(“A Fire Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Fire_Warning.wav”);
}
else {
lcd01.setCursor(8, 0);
lcd01.print(sensorValue1);
delay(1000);
}

int agas01; int sensorValue2;
sensorValue2 = analogRead(A2);
if (agas01>0) { //Change value later.
lcd01.setCursor(0, 1);
lcd01.print(“Gas Warning!”);
GSM.beginSMS(xxxxxxxxxx);
GSM.print(“A Combustible Alcohol Gas Warning Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Gas_Warning.wav”);
}
else {
lcd01.setCursor(13, 0);
lcd01.print(sensorValue2);
delay(1000);
}
int smoke01; int sensorValue3;
sensorValue3 = analogRead(A3);
if (smoke01>0) { //Change value later.
lcd01.setCursor(0, 1);
lcd01.print(“Smoke Warning!”);
GSM.beginSMS(9059064802);
GSM.print(“A Smoke Warning Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Smoke_Warning.wav”);
}
else {
}

int motion01; int sensorValue4;
sensorValue4 = analogRead(A4);
if (motion01>0) { //Change value later.
lcd01.setCursor(0, 1);
lcd01.print(“Intruder Warning!”);
GSM.beginSMS(xxxxxxxxxx);
GSM.print(“An Intruder Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“Intruder_Warning.wav”);
}
else {
}

int carbonM01; int sensorValue5;
sensorValue5 = analogRead(A5);
if (motion01>0) { //change value later.
lcd01.setCursor(0, 1);
lcd01.print(“CO Warning!”);
GSM.beginSMS(xxxxxxxxxx);
GSM.print(“Carbon Monoxide Has Been Detected In Your Home!”);
GSM.endSMS();
audio.play(“CO_Warning.wav”);
}
else {
}
}

Central_Module.ino (3.25 KB)

Look at the first lines in the topic about how to attach info like code, pictures etc. #7. We don't want, or can't, download sketches and then You get no answer.
What is it You can't fix?

OK, first things first.

You need to go and read the forum instructions so that you can go back and modify your original post - the “More → Modify” option below the right hand corner of your post - to mark up your code as such using the “</>” icon in the posting window. Just highlight each section of code (or output) from the IDE and click the icon. In fact, the IDE has a “copy for forum” link to put these markings on for you so you then just paste it here in a posting window.

It is not a good idea to attach it as a “.ino” file. People can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And that would also assume they are using a PC and have the IDE running on that PC.

But don’t forget to use the “Auto-Format” (Ctrl-T) option first to make it easy to read. If you do not post it as “code”, it can be quite garbled and is always more difficult to read.

To debug , cut your program down and try compiling sections of it to see where the error is . You should do this when you write it - keep testing it when you add code .

Also google the errors you get for better understanding of what is wrong .

xxxxxx. ? Setup of analogs ?

I already know which lines have errors, I'm just clueless as to how I should go about fixing them.

sketch_jan03b:20:9: error: expected unqualified-id before '.' token

TMRpcm.audio;

^

C:\Users\DarkHawk727\Documents\Arduino\sketch_jan03b\sketch_jan03b.ino: In function 'void loop()':

sketch_jan03b:33:6: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:34:3: error: 'sms' was not declared in this scope

sms.print("A Humidity Warning Has Been Detected In Your Home!");

^

sketch_jan03b:35:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:36:9: error: expected unqualified-id before '.' token

TMRpcm.play("Wet_Warning.wav");

^

sketch_jan03b:41:8: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:42:6: error: expected unqualified-id before '.' token

GSM.print("A Dryness Warning Has Been Detected In Your Home!");

^

sketch_jan03b:43:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:44:9: error: expected unqualified-id before '.' token

TMRpcm.play("Dry_Warning.wav");

^

sketch_jan03b:60:7: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:61:6: error: expected unqualified-id before '.' token

GSM.print("A Fire Has Been Detected In Your Home!");

^

sketch_jan03b:62:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:63:9: error: expected unqualified-id before '.' token

TMRpcm.play("Fire_Warning.wav");

^

sketch_jan03b:76:6: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:77:6: error: expected unqualified-id before '.' token

GSM.print("A Combustible Alcohol Gas Warning Has Been Detected In Your Home!");

^

sketch_jan03b:78:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:79:9: error: expected unqualified-id before '.' token

TMRpcm.play("Gas_Warning.wav");

^

sketch_jan03b:91:6: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:92:6: error: expected unqualified-id before '.' token

GSM.print("A Smoke Warning Has Been Detected In Your Home!");

^

sketch_jan03b:93:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:94:9: error: expected unqualified-id before '.' token

TMRpcm.play("Smoke_Warning.wav");

^

sketch_jan03b:104:6: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:105:6: error: expected unqualified-id before '.' token

GSM.print("An Intruder Has Been Detected In Your Home!");

^

sketch_jan03b:106:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:107:9: error: expected unqualified-id before '.' token

TMRpcm.play("Intruder_Warning.wav");

^

sketch_jan03b:117:6: error: expected unqualified-id before '.' token

GSM.beginSMS(9059064802);

^

sketch_jan03b:118:6: error: expected unqualified-id before '.' token

GSM.print("Carbon Monoxide Has Been Detected In Your Home!");

^

sketch_jan03b:119:6: error: expected unqualified-id before '.' token

GSM.endSMS();

^

sketch_jan03b:120:9: error: expected unqualified-id before '.' token

TMRpcm.play("CO_Warning.wav");

It looks like you create the GSM object in the scope of the setup function and then try to use it in loop where it doesn't exist. Try making it global.

Read up on "C++ variable scope"