I get the following error message about too many input arguments in my fprintf function. But it seems to me that just the right amount of arguments were passed.
There are multiple functions called fprintf, one for files, one for serial objects and some others. You are using functionally which you know from the fprintf for files, but you are using it with a serial object. Check the right documentation which can be accessed via doc serial/fprintf