Skip to reading
PCA Script Programming

Builtins: Calendar and files

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page

script_error()#

Code example
script_error(message)

Report an error-level diagnostic.

Returns: Null.

Code example
script_error("The puzzle setup is incomplete.")

The helper logs; it does not throw a catchable PCA exception or end the current function.

pca_assert()#

Code example
pca_assert(condition, message = "Assertion failed.")

Report when a diagnostic condition is false.

Returns: The condition as a Boolean.

Code example
pca_assert(5 > 0, "Score must be positive.")

The assert statement is the failing/stop form. This helper reports and returns a value.

breakpoint()#

Code example
breakpoint()

Diagnostic compatibility helper.

Returns: Null.

Code example
breakpoint()

For an actual debugger pause use the standalone breakpoint statement or the editor gutter while debugging is enabled.

Page 72 of 357Permalink
Go to page