WorldDocumentError$ ( )

Parameters

None.

Description

Returns the most recent actionable WorldDocument error.

The error belongs to the current runtime context and includes failures that could not return a document handle.

For the full story, see the Debug World Editor guide.


See also: WorldDocumentLastDiagnostics, WorldDocumentDiagnostics, LoadWorldDocument.

Example

; WorldDocumentError Example
; --------------------------

; Loading a file that does not exist returns zero and records the reason
document=LoadWorldDocument("missing-world-document.world")

If document=0
    Print "Load returned 0"
    Print "WorldDocumentError: "+WorldDocumentError()
Else
    ; Should not happen - the file is deliberately missing
    FreeWorldDocument document
EndIf

Print ""
Print "Press any key to close the example"
WaitKey

End

Index