buffer_load_ext

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

Syntax:

GML Code Example

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


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.


Example:

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





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here