Load the contents of a previously saved buffer into a buffer at the given position.


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


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.


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).

Back: Buffers
Next: buffer_load_async
© Copyright YoYo Games Ltd. 2015 All Rights Reserved