|
miischi Beginner
Joined: 04 Jan 2009 Posts: 20
|
Posted: Mon Jan 26, 2009 2:56 am
[2.37] Another Alias Problem |
me again :P i just can't get the stuff working as i'd like it to be.
#TRIGGER { %1 *LOCATION} {LOCATIONVAR = %1;#GAG}
#ALIAS ALIASNAME {enter portal;mantra @LOCATIONVAR}
the word that is captured by %1 changes, hence the paramater. my problem is that it also captured the spaces behind that word.
i tried to avoid that by using *LOCATION with one fixed space behind the paramater. sadly the parameters don't always consist of the
same length as words, so the number of spaces behind them varies, too.
short example:
Code: |
montinommmon Air Temple, south crossing
#TRIGGER { %1 *Air Temple, south crossing} {airtemple = %1;#GAG}
#ALIAS ptemple {enter portal;mantra @airtemple}
it will fire
"enter portal;mantra montinommmon "
|
either of you can help me with my problem? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Jan 26, 2009 3:52 am |
Never use %1 in a trigger pattern. That's only asking for trouble. If it's always going to be a word, then use (%w), which will match one word only.
If it can be more than one word, or have an apostrophe in it, then we have to come up with something else.
Charneus |
|
|
|
miischi Beginner
Joined: 04 Jan 2009 Posts: 20
|
Posted: Mon Jan 26, 2009 7:26 am |
i'll check it out with the %w . i just need to replace the %1 with %w ? in the actual trigger pattern and the value?
|
|
|
|
miischi Beginner
Joined: 04 Jan 2009 Posts: 20
|
Posted: Mon Jan 26, 2009 7:29 am |
woop woop, works. big thanks :D
|
|
|
|
|
|