fileWrite
Shared
Writes one or more texts to a file, at the current position.
int|false fileWrite(file file, string ...)
Parameters
| Name | Type | Description |
|---|---|---|
| file | file | A file opened by fileOpen or fileCreate. |
| ... | string | The texts, written one after another. |
Returns
How many bytes were written, or false if the file was opened read-only, is sealed server content or the write failed.
Example
local file = fileCreate("scores.csv")
fileWrite(file, "name,score\n", "carl,350\n")
fileClose(file)