M MY Multiplayer: Wiki
Side
Kind

fileWrite

Shared

Writes one or more texts to a file, at the current position.

int|false fileWrite(file file, string ...)

Parameters

NameTypeDescription
filefileA file opened by fileOpen or fileCreate.
...stringThe 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)

See also