world.SetEntity
Sets the value of an MXP entity
Prototype
void SetEntity(BSTR Name, BSTR Contents);
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
See also
| Function | Description |
|---|---|
| GetEntity | Retrieves the value of an MXP server-defined entity |
| GetVariable | Gets the contents of a variable |
| SetVariable | Sets the value of a variable |