knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

Sketch No Longer compiles (SOLVED) #913

Closed acestu closed 2 years ago

acestu commented 2 years ago

Hi, I have a sketch using Pubsubclient using the following line to send a temperature value in a string, it has always compiled ok in the past, however it no longer compiles saying that "TRUE" was Not declared in this scope,

client.publish("Pressure1", String(temp0).c_str(),TRUE);

Any help would be appreciated Thanks Stuart B

acestu commented 2 years ago

OK, after a bit of research I found this:

Recent changes to the Arduino IDE mean that sketches that compiled satisfactorily with versions prior to 1.8.7 produce errors.

The special Arduino keywords “TRUE”, “FALSE” and “boolean” are no longer allowed. Replace every instance of TRUE with true and every instance of FALSE with false. Also replace every instance of boolean with bool.

So just changing TRUE to lower case solves the problem

Sorry it was an Arduino IDE problem and NOT Pubsubclient problem Please mark as SOLVED

Thanks Stuart B

knolleary commented 2 years ago

Please mark as SOLVED

Glad to hear you've figured it out. For future reference, you can close issues you've raised yourself.

acestu commented 2 years ago

Hi Nick,

I was looking how to do that, couldn't find it so I thought you just changed the title to solved

Thanks Stuart B