Code was working, now getting errors?

Hi, i opened a previously used (and verified) code to the IDE, and now i am getting weird error messages, such as:

sketch_feb17b.ino:25:6: error: stray '\' in program
sketch_feb17b.ino:25:6: error: stray '\' in program
sketch_feb17b.ino:28:10: error: stray '\' in program
sketch_feb17b.ino:28:10: error: stray '\' in program
sketch_feb17b.ino:31:7: error: stray '\' in program
sketch_feb17b.ino:31:7: error: stray '\' in program
sketch_feb17b.ino:34:10: error: stray '\' in program
sketch_feb17b.ino:34:10: error: stray '\' in program
sketch_feb17b.ino:37:7: error: stray '\' in program
sketch_feb17b.ino:37:7: error: stray '\' in program
sketch_feb17b.ino:40:10: error: stray '\' in program
sketch_feb17b.ino:40:10: error: stray '\' in program
sketch_feb17b.ino:43:7: error: stray '\' in program
sketch_feb17b.ino:43:7: error: stray '\' in program
sketch_feb17b.ino:46:10: error: stray '\' in program
sketch_feb17b.ino:46:10: error: stray '\' in program
sketch_feb17b.ino:49:7: error: stray '\' in program
sketch_feb17b.ino:49:7: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino: In function 'void loop()':
sketch_feb17b.ino:25:25: error: 'u20191' was not declared in this scope
sketch_feb17b.ino:25:32: error: expected ')' before 'u2032'
sketch_feb17b.ino:28:29: error: 'u201cGREEN' was not declared in this scope
sketch_feb17b.ino:31:26: error: 'u20192' was not declared in this scope
sketch_feb17b.ino:31:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:34:29: error: 'u201cBLUE' was not declared in this scope
sketch_feb17b.ino:37:26: error: 'u20193' was not declared in this scope
sketch_feb17b.ino:37:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:40:29: error: 'u201cRED' was not declared in this scope
sketch_feb17b.ino:43:26: error: 'u20194' was not declared in this scope
sketch_feb17b.ino:43:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:46:29: error: 'u201cWHITE' was not declared in this scope
sketch_feb17b.ino:49:27: error: 'u20190' was not declared in this scope
sketch_feb17b.ino:49:34: error: expected ')' before 'u2032'
sketch_feb17b.ino:55:29: error: 'u201cLED' was not declared in this scope
Error compiling.

And the actual code:

#include <SoftwareSerial.h>

SoftwareSerial bluetooth(10, 11); // RX, TX
int ledGRN = 4;
int ledBLU = 5;
int ledRED = 6;
int ledWHI = 7; 
int BluetoothData;

void setup() 
{
  bluetooth.begin(9600);
  pinMode(ledGRN,OUTPUT);
  pinMode(ledBLU,OUTPUT);
  pinMode(ledRED,OUTPUT);
  pinMode(ledWHI,OUTPUT);
}

void loop()
{
   if (bluetooth.available())
   {
     BluetoothData=bluetooth.read();
     
     if(BluetoothData==’1′)
       {  
         digitalWrite(ledGRN,1);
         bluetooth.println(“GREEN ON”);
       }
       
      if(BluetoothData==’2′)
       {  
         digitalWrite(ledBLU,1);
         bluetooth.println(“BLUE ON”);
       }
       
      if(BluetoothData==’3′)
       {  
         digitalWrite(ledRED,1);
         bluetooth.println(“RED ON”);
       }
       
      if(BluetoothData==’4′)
       {  
         digitalWrite(ledWHI,1);
         bluetooth.println(“WHITE ON”);
       }
       
      if (BluetoothData==’0′)
       {
         digitalWrite(ledGRN,0);
         digitalWrite(ledBLU,0);
         digitalWrite(ledRED,0);
         digitalWrite(ledWHI,0);
         bluetooth.println(“LED’S OFF”);
       }
     
    }
      delay(100);
}

I’ve been trying to figure this out for awhile now, and have run out of ideas. Any help would be much appreciated.

I cannot reproduce the error. However...

                       ˅ --- That...
     if(BluetoothData==[glow=red,2,300]'[/glow]1[glow=red,2,300]′[/glow])
       {

...is the correct delimiter for a character constant. The next character, the one after the 1, is not.

Unicode character(s)... https://www.google.com/search?q=site%3Aforum.arduino.cc+error%3A+stray+%27\%27+in+program

Did you copy paste your code into MS word or other word editors? They do "smart quotes".

[quote author=Coding Badly link=msg=2098257 date=1424237708] I cannot reproduce the error. However...

                       ˅ --- That...
     if(BluetoothData==[glow=red,2,300]'[/glow]1[glow=red,2,300]′[/glow])
       {  [/tt

...is the correct delimiter for a character constant.  The next character, the one after the 1, is not.


[/quote]

Thanks, this helped with some errors. I'm guessing there's more, I might just have to re-type the whole thing.

I did. It was an old post from my blog... :/ 

I'm still having trouble finding which characters were replaced.. I read that a "minus" symbol could be affected, but i don't see any in my code..

I got bogged down trying to pronounce your user name:

.:)\(£0:.

.:)(£0:.:
I’ve been trying to figure this out for awhile now, and have run out of ideas. Any help would be much appreciated.

That’s what happen when blogs “helpfully” turn quotes into typographers quotes, and is also why we use code tags here.

.:)(£0:.: I'm still having trouble finding which characters were replaced..

Don't bother.

In your first post, click Select then Ctrl + C. In the Arduino IDE, Ctrl + A then Ctrl + V. Fix the weird quotes. Enjoy.

Wordpress blogs do smart quotes too. I was not aware of that until someone told me that my code didn't work.

That explains why so many people were having problems with their code. Good to know, I'll try this when I get home!