TRoot.DeleteWorld

Procedure DeleteWorld(Index: Integer);
Index is the world in the list of worlds saved in the Root object.

You should generally never delete a world. All worlds are automatically freed when Qex closes. The world you delete, however, may be the one the user is looking at, and he won't have an opportunity to save (Or worse, he may be running a script on it, which will have undefined results).

Example: Root.Delete(Root.WorldList.FindByName('My Created World')); Note: The list is zero-based.