Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Programming MPI

From Tapestries MUCK

Jump to: navigation, search

Although it can look rather cryptic at first glance, MPI is pretty simple once you grasp it. The general syntax for any MPI function is similar to one of the two entries below:

{SomeFunction:Do Something}
{SomeFunction:Some Value,do something}

The MPI documentation for the various MPI Functions lists each function and the syntax for how it's used.

Expanding the Abbreviations

The MPI documentation uses several abbreviations to point out what sort of data should be in a given field. Those Abbreviations are explained below.

  • var - This is short for variable. Generally it is user defined and is called later somewhere else by invoking it with {&VariableName}
  • name - This can reference one of a couple things depending on where it's seen. In the Func (MPI) function it defines the name of your function, and is later called with {FunctionName}. In most other cases it's a reference to Name (MPI) or the name of a player.
  • list - This is a reference to a list, a list can be faked with the use of Mklist (MPI).
  • expr - This is a reference to an expression, it's the code you play to run once the earlier steps in a given function have been defined.
  • expr1, expr2, etc - These are used by some mpi functions for situations where you have multiple expressions. MPI functions that offer this generally require it and explain what expr1 and expr2 do.
  • sep - This stands for separator. Generally a separator is used to tell some MPI to use a different character for separation of variables than the default (usually a linebreak or a comma). Sometimes it's desirable to use a space or some other character inside. The default separator is stated in the entry for each MPI function and is usually an optional field
  • sep2, s2 - This is simply a second separator used by some MPI functions. Often times it's used to change the separator on the output to something other than the default.
  • check - A check is something that gets done to determine how to proceed. For example "{if:check,true,false}", if the check returns true then true is run, if the check returns false then the false is shown.
  • true, false - True and false are generally each an expression, but can sometimes be left blank.
  • obj - This stands for object and is usually used to define where something is stored when it's not this.

See Also

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox