|
id$ - stable world ID name$ - display name |
|
Creates an untitled .world document and returns its handle. The new document is a valid .world version 1 document and starts clean at revision zero. The handle is generational. For the full story, see the Debug World Editor guide. See also: LoadWorldDocument, SaveWorldDocument, ApplyWorldDocumentEdit, WorldDocumentJson, FreeWorldDocument. |
; CreateWorldDocument Example
; ---------------------------
; A new document is a valid, untitled .world version 1 document
document=CreateWorldDocument("example-world","Example World")
If document=0 Then RuntimeError WorldDocumentError()
Print "Created a world document"
Print "Revision: "+WorldDocumentRevision(document)
Print "Unsaved edits: "+WorldDocumentDirty(document)
Print "Path (empty while untitled): '"+WorldDocumentPath(document)+"'"
FreeWorldDocument document
Print ""
Print "Press any key to close the example"
WaitKey
End