path_exists

This function returns whether a path with the given index exists or not. Note that if you check for the existence of a path through a variable that has yet to have been declared, this will throw an error.

 

Syntax:

path_exists(index);

 

ArgumentTypeDescription
indexPath AssetThe index of the path to check for.

 

Returns:

Boolean

 

Example:

if (path_exists(my_path))
{
    path_delete(my_path);
}

This code checks to see if the given variable stores a path index and if it does, then the path is deleted from memory.