Compile error when calling server.on

Really struggling here and not sure what to search on.

I'm trying to get a small web server set up on an ESP8266. I'm using the ESP8266WebServer
library.

When compiling, I get an error on Line 19 which is:

server.on(“/”, handleRootPath); //server is an instance of the ESP8266WebServer object

Error in compiler window shows:

function 'void setup()':
new1:19: error: 'u201c' was not declared in this scope

The code in line 19 is very commonly found in examples of how to set up this server.

Any ideas would sure be appreciated.

I suspect it's caused by some hidden characters you picked up by copying the code from some website. Try this:

  1. Paste your code in a reply here in a code block (</> button on the post composer toolbar).
  2. Select and copy the code from the code block in the post composer preview pane.
  3. Paste the copied code to your sketch.

Hopefully this will remove all hidden characters from the code.

1 Like

u201c is a "left Quote"... Pert is probably correct. It would be easily remedied by simple removing the Quote marks around the slash and typing both back in using your Keyboard.

That was it fellas. Thanks a bunch.

S