buffer_resize

Resize a given buffer.

Syntax:

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


Description

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


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
Next: buffer_sizeof
© Copyright YoYo Games Ltd. 2018 All Rights Reserved