Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.DatabaseList


Name DatabaseList
Type Method
Summary Lists all databases
Prototype VARIANT DatabaseList();
Description

This returns a list of all databases created for this world. You could use this to find which databases have been created, and then use DatabaseInfo to find information about each one.


Note: Available in version 4.40 onwards.


Lua example
-- show all databases
databases = DatabaseList()

if databases then
  for _, v in ipairs (databases) do 
    Note (v) 
  end
end -- if any
Lua notes
Lua returns nil if there are no databases.
Returns If there are no databases then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the names of all the databases. Use "ubound" to find the number of databases in the list. You can then use "DatabaseInfo" to find details about each database.
Introduced in version 4.40

See also ...

Function Description
DatabaseInfo Returns information about a database

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.