buffer_load_ext


Description

This function will load the buffer data that was previously saved using the buffer_save functions into an already created buffer. You give the id of the previously created buffer to load into, then the saved buffer file to load, and finally the offset from the start of the buffer (in bytes) that you wish to load the data to.


Syntax:

buffer_load_ext(buffer, filename, offset);

Argument Description
buffer The index of the buffer to load into.
filename The name of the file to load from.
offset The offset within the buffer to load to (in bytes).


Returns:

N/A


Example:

var pos = buffer_seek(player_buffer, buffer_seek_end, 0);
buffer_load(player_buffer, "Data_Save.sav", pos);

The above code will first get the position of the end of the buffer indexed in the variable "player_buffer" and then loads the data from the given into that position (note that this example will only work with "grow" or "wrap" buffer types).