I am trying to use PubSubClient library for MQTT connection with Arduino. I am using the code below to create the connection with credentials and cleanSession set to false for the persistent session.
This is the line of code I am using which is defined under the setup loop:
client.connect("XYZ759", ["username", '"0123456789"], [false]);
I am getting the following error:
expected '{' before ',' token.
The void loop brakets are checked and all other brackets are checked but I can't find where the problem is.
I tried setting the client ID and creditionals in a constant character array in global variables but still got the same error.
This is the link for the syntax of the connect function:
https://pubsubclient.knolleary.net/api#connect