ptr

This function will attempt to convert a given value into a pointer data type, where the value must be either a real, a string, an int64, an int32, or a ptr. Anything else will cause the game to crash with an error message.

 

Syntax:

ptr(n);

Argument Type Description
n RealString, or Pointer The value to convert.

 

Returns:

Pointer

 

Example:

if !is_ptr(val)
{
    val = ptr(application_surface);
}

The above code checks the variable "val" to see if it contains a pointer and if it does not then one is assigned to it.