buffer_exists

Checks to see if the input variable is a buffer ID or not.

Syntax:

buffer_exists(buffer)


Argument Description
buffer The index of the buffer to check.


Returns: Boolean


Description

This function can be used to check a variable to see if it holds a valid buffer ID value or not. If it does the function will return true otherwise it will return false.


Example:

if buffer_exists(buff)
   {
   buffer_delete(buff);
   }

The above code checks to see if the variable "buff" holds a buffer ID and if it does, the buffer is deleted.


Back: Buffers
Next: buffer_write
© Copyright YoYo Games Ltd. 2018 All Rights Reserved