 |
forren Novice
Joined: 26 Apr 2007 Posts: 44
|
Posted: Mon Jun 11, 2007 1:27 am
Wildcard references with {x1|x2} |
Alright, so I have this trigger:
^Your hearing sharpens as your {left|right} ear regenerates.
$aff = %concat(severed, %1, ear)
#SAY $aff
#SAY %1
preRemoveAffliction $aff
When I put this into practice, %1 turns out to be a null value, and as such, $aff becomes "severedear". The only way I can get this to work correctly is by using (%w) instead of {left|right}. Is this a bug, or do I need to do this instead of specifically referencing left/right if I want to store the value? |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jun 11, 2007 1:36 am |
At ALL times, whenever you want to capture data into a %1...%99 sort of variable you need to use either the direct variable assignment operator (&varname) or surround the wildcard component with parentheses.
^Your hearing sharpens as your ({left|right}) ear regenerates. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
forren Novice
Joined: 26 Apr 2007 Posts: 44
|
Posted: Mon Jun 11, 2007 1:37 am |
Ah, that was my issue. Fixed it. Thanks!
|
|
|
|
 |
|
|
|