Skip to reading
GDScript Programming & Godot

Log()

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
Code example
Log(message: Variant) -> void

Write text to PCA’s runtime log, falling back to print when no runtime logger exists.

Returns: Void.

Code example
Log("Archive unlocked.")

Warn()#

Code example
Warn(message: Variant) -> void

Report a Godot warning and a warning-tagged PCA log message.

Returns: Void.

Code example
Warn("Optional chime is missing.")

ScriptError()#

Code example
ScriptError(message: Variant) -> void

Report a Godot error and an error-tagged PCA log message.

Returns: Void.

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

This logs; it does not throw a catchable GDScript exception.

PCAAssert()#

Code example
PCAAssert(condition: bool, message: String = "PCA3D script assertion failed.") -> bool

Report a diagnostic when the condition is false.

Returns: The Boolean condition.

Code example
PCAAssert(5 > 0, "Points must be positive.")

It is not an exception boundary. Native assert has separate debug-build behavior.

Page 70 of 378Permalink
Go to page