world.SetEntity

MUSHclient script function (Method) — introduced in version 3.66

Sets the value of an MXP entity

Prototype

void SetEntity(BSTR Name, BSTR Contents);

Data type meanings

Description

Sets the value of an MXP (custom) entity.

If the supplied contents is the empty string, the entity is deleted.

If the entity already exists it is replaced.

No checking is made for the name or contents strings' values (for example, they might be just spaces).

It is up to you to use sensible values.

Custom entities are stored separately from standard entities. Thus you cannot replace, for example, the "lt" entity.

VBscript example

SetEntity "foo", "bar"

Jscript example

SetEntity ("foo", "bar");

Lua example

SetEntity ("foo", "bar)

Lua notes

The contents are optional. If omitted they default to the empty string, and thus the named entity will be deleted.

Return value

Nothing.

Related topic

Information

See also

FunctionDescription
GetEntityRetrieves the value of an MXP server-defined entity
GetVariableGets the contents of a variable
SetVariableSets the value of a variable