Fragmenting one overarching/common question into multiple threads isn’t best practice.
However, when you use Web IDE, you should click the SHOW RAW button to see more background info about the error message.
Ambiguity errors usually are caused by multiple use of the same name for different purposes and the first step to remedy such an issue is to try renaming the offending variable.
OK, then you may want to read up on printf() first.
This will provide you with the basics of formatting strings
Once that has become clear you can apply that insight to snprintf() where s stands for Storage and n for max Number of characters.
Armed with that insight you will be able to interpret how and why the code above does what it does and can solve your immediate question and will also be able to re-apply that insight over and over of further questions that may arise.
BTW, about this
this is the old syntax.
The modern version would be this