buffer_save_ext

This function saves part of the contents of a buffer to a file, ready to be read back into memory using the buffer_load function.

The "offset" defines the start position within the buffer for saving (in bytes), and the "size" is the size of the buffer area to be saved from that offset onwards (also in bytes).

 

Syntax:

buffer_save_ext(buffer, filename, offset, size);

ArgumentTypeDescription
bufferBufferThe buffer to save.
filenameStringThe name of the file to save as.
offsetRealThe offset within the buffer to save from (in bytes).
sizeRealThe size of the buffer area to save (in bytes).

 

Returns:

N/A

 

Example:

buffer_save_ext(buff, "Player_Save.sav", 0, 16384);

This function saves part of the current contents of the buffer stored in the variable buff to a file.