bbmod_buffer_load_async

A function defined in __bbmod_async.gml

bbmod_buffer_load_async(_file, _callback)

Description

Asynchronnously loads a buffer from a file.

Arguments

Name Type Description
_file String The path to the file to load the buffer from.
_callback Function The function to execute when the buffer is loaded or if an error occurs. It must take the error as the first argument and the buffer as the second argument. If no error occurs, then undefined is passed. If an error does occur, then buffer is undefined.

Example

bbmod_buffer_load_async("buffer.bin", function (_error, _buffer) {
   if (_error != undefined)
   {
       // Handle error here...
       return;
   }
   // Use the loaded buffer here...
});

Note

You must call bbmod_async_save_load_update in an appropriate event for this function to work!

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on January 21, 2024 using GMDoc.