Returns the size (in bytes) of a given buffer.


GML Code Example


Argument Description
type The type of data that is to be checked (see the list of constants here).

Returns: N/A


This function will return the size (in bytes) of any of the given data constants (listed here).


GML Code Example

var b = 12 * buffer_sizeof(buffer_u8);
 buff = buffer_create(b, buffer_fixed, 1);

The above code first calculates the size of the buffer to create by multiplying the unsigned 8bit data type by 12 (since we will be using the buffer to hold 12 pieces of data), and then uses this value to set a fixed buffer to the correct size.

Back: Buffers
Next: buffer_md5

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