world.ChangeDir

MUSHclient script function (Method) — introduced in version 3.80

Changes the MUSHclient working directory

Prototype

long ChangeDir(BSTR Path);

Data type meanings

Description

This lets you change the current working directory used by MUSHclient. This is useful for situations (like plugins) where you want to load files relative to the plugin location but are unsure if the working directory is at the plugin location. eg.

ChangeDir (GetInfo (66)) --> ensure directory is MUSHclient.exe directory

Note that some actions (like opening world files) may change the directory (eg. to the world file directory) as a side-effect.

VBscript example

ChangeDir GetInfo (66)

Lua example

ChangeDir (GetInfo (66))

Return value

0 - Did not change directory
1 - Did it OK

Related topic

Utilities

See also

FunctionDescription
GetInfoGets information about the current world