printf(char* format, ....)
LC Open a message box and displays
text or variables in lite-C Pure Mode.
format - Format string.
- Unlike most other functions, this one accepts a variable number of char*, int, or double arguments (no var or float). Make sure in its argument list to typecast a var to (long) or (double), and convert STRING* to char* with the _chr function. The format string must contain specifications that determine the output format for the arguments that follow. The output string must not exceed 256 characters. See a C language documentation or Digits for C-style format strings.
If an engine window was not openend - f.i. when the engine was started in standalone server mode, or when video_screen was set to 0 at the beginning - printf() places its output into the startup window rather than using a message box. In this case it's recommended to call video_window(NULL,NULL,112,NULL) for getting a border with movable title bar and close button, and using the form feed character ('\f') for clearing the previous text from the startup window.
var my_var = 123.456;
str_printf, C++ conversion