JPG, BMP, DDS (uncompressed),
and PNG image formats are supported. The default is JPG.
The file is saved in the saved games folder (-> save_dir).
The screenshot is not taken immediately, but one frame after the instruction. Only one screenshot per frame can be saved.
The file format is the same as the format of the screen buffer, therefore BMP files are often saved in an unusual 32 bit ARGB format that can't be read by the engine, and by many paint programs like Photoshop.
file_for_screen("shot.png",123); // saves a screenshot to "shot123.png"