buffer_get_size

This function gets the size in bytes of the given buffer.

 

Syntax:

buffer_get_size(buffer);

ArgumentTypeDescription
bufferBufferThe buffer to get the size of.

 

Returns:

Real

 

Example:

var _size = buffer_get_size(player_data);
var _temp = buffer_create(_size, buffer_fixed, 0);

The above code creates a new buffer and stores it in a local variable _temp, with the size of the new buffer being the same as that of the buffer stored in the variable player_data.