Resize a given buffer.


GML Code Example

buffer_resize(buffer, newsize);

Argument Description
buffer The index of the buffer to change the size of.
newsize The new size of the buffer (in bytes).

Returns: N/A


With this function you can resize a given buffer to be the size (in bytes) that you specify.


GML Code Example

if buffer_get_size(buff) < 16384
    buffer_resize(buff, 16384);

The above code will check the size of the buffer indexed in the variable "buff" and if it is less than the given value, the buffer is resized.

Back: Buffers

No Examples Submitted

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

These are page edits suggested by the community. Cast your vote to help improve the manual.

Suggested by /u/aleksandrInt on July 02, 2017

Should note that if the seek position is beyond the new size, it is reset to 0 (instead of modulo or staying the same)

Edited On July 02, 2017

No Questions Have Been Ask

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