Too few arguments to function.

Good Evening,

I've been helping a friend with a bit of coding (blind leading the blind), and I've hit a problem that I don't understand.

If I use this line of code:

printText((char *)devicename, strlen(devicename));

to pass parameters to this function:

void printText(char * instrng , size_t messageLen) {
}

Everything works fine.

We want to pass an additional parameter to the printText function, but if I make the changes below, we get a compile error - too few arguments to function 'void printText(char*, size_t, byte).

byte screenLocation = 1;  
  printText((char *)devicename, strlen(devicename), screenLocation);
void printText(char * instrng , size_t messageLen, byte screenPos) {
}

I think I understand what the error means, but as far as I can see, I am passing the correct number of arguments.

Any ideas ?

Thanks,

Ian.

Any ideas ?

Perhaps they have some at http://snippets-r-us.com. Here, we like to see all of your code, so we can (try to) reproduce the problem.

You sure you have not got other calls to this function that you are not editing? It is normal to post all your code so we can see things like that. Use the search function to see if you have got them all.

PaulS: Here, we like to see all of your code, so we can (try to) reproduce the problem.

I appreciate that, but the code is spread across multiple tabs and uses a lot of different libraries, so not easy to post it all, or strip it down to a point where it could be. Thanks for your help though.

Ian.

Grumpy_Mike: You sure you have not got other calls to this function that you are not editing?

Thanks Mike. That was it.

Ian.