file:write (...)
Writes the value of each of its arguments to the file. The arguments must be strings or numbers. To write other values, use tostring (e) or string.format (formatstring, ...) before write.
file
tostring (e)
string.format (formatstring, ...)
write