WorldDocumentPath$ ( document )

Parameters

document - world document handle

Description

Returns the file path adopted by a world document.

The path is absolute, or an empty string for an untitled document.

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


See also: SaveWorldDocument, WorldDocumentDirty.

Example

; WorldDocumentPath Example
; -------------------------

; An untitled document has no path yet
document=CreateWorldDocument("path-example","Path Example")
If document=0 Then RuntimeError WorldDocumentError()
Print "Untitled path: '"+WorldDocumentPath(document)+"'"
FreeWorldDocument document

; A loaded document adopts the absolute path of its file
document=LoadWorldDocument("../../../samples/world-editor/starter.world")
If document=0 Then RuntimeError WorldDocumentError()
Print "Loaded path: "+WorldDocumentPath(document)
FreeWorldDocument document

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

End

Index