Error: no matching function for call to ...

Hello all,

I am trying to strip up a string, to use it in a function, but i can’t figure out why it doesn’t work. Any ideas? This is the code:

void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print("] ");
  for (int i=0;i<length;i++) {
  String nodeIDstring = String(topic).substring(12, 13);
  String systemCode = String(topic).substring(10, 11);
  int nodeID = nodeIDstring.toInt();
  if (payload[0] == 48){
  } else if (payload[0] == 49) {
  } else {
    Serial.println('Unknown Character');

It returns this error:

no matching function for call to ‘Transmitter::sendSignal(int&, String&, bool)’

You are sending a String (object) to a function that expects a string (c-string or null terminated character array). You could use the toCharArray() function to convert the String to a string and send the resulting string to the function. Better yet, don't use Strings as they can cause memory corruption in the small memory available to most Arduinos.