|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sat Jun 23, 2012 7:15 pm
Open Door Trigger (Cont) |
I'm having a problem with my old open door trigger from zmud.
Mud String:
The closed gate block(s) your passage north.
Trigger:
^The closed (%w) block?s? your passage (%w).$
Value:
open %2.%1
%2
Result:
open
north
It needs to open north.door
then go north |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Jun 23, 2012 8:37 pm |
The reason it does this is because CMud is looking for the key field of door in the %2 variable. There's no such key there, so the obvious and proper result is a null value.
What you are doing is a practice called "implicit concatenation". To avoid situations like this, it's a good idea to surround the literal portions of your string with double quotes:
open %2"."%1
Additionally, you cannot start a line with a variable or function reference, except in the case of a=b style assignment. Use #SEND (if you want to see the command echo) or #SENDRAW (if you don't want to see the command echo) to send stuff to the mud. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Jaiven Wanderer
Joined: 03 Oct 2007 Posts: 66
|
Posted: Sat Jun 23, 2012 9:10 pm |
Thank you! I appreciate all the additional info too!
|
|
|
|
|
|