Publishing several fields in one event

For float and double input variables snprintf() would require you to use something like "%.1f" instead of "%u".

snprintf() uses the same formatting pattern as printf()
%u stands for unsigned decimal integer - meaning an integer input type not to be confused with the output format.