Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 29, 2004 12:49 pm |
The syntax for the #SUB command is:
#SUBSTITUTE string [string]
Where the second string is optional. If it is not present, then what #SUB does is substitute the text matched by the last trigger with the first (and only one present) string.
However, if the second string is present, then #SUB creates a new trigger with the pattern set to the first string and the command set to #SUB followed by the second string.
Since in zMUD scripting a space separates command arguments, your #SUB was being evaluated as the latter form. It was creating triggers with pattern %ansi(bold,magenta)==>" and command #SUB "%1.
To prevent this, you must tell zMUD that what comes after the #SUB is all one argument. You do this by enclosing it in braces. Like this:
#SUB {%ansi(bold,magenta)==>" "%1} |
|