Fwrite
From SA-MP Wiki
Fwrite
Write in a file.
(File:handle, string[])
| handle | The file to write to |
| string | The string to write |
This function does not return a specific value.
public OnGameModeInit() { new File:log = fopen("/ServerLog.txt", io_write); // Open the file fwrite(log, "Server started.\r\n"); // Write to the file (\r\n is for a new line) fclose(log); // Close the file return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- fread: Read a file.
- fopen: Open a file.
- fclose: Close a file.
- fremove: Remove a file.
