|
whorn Wanderer
Joined: 04 May 2002 Posts: 52 Location: USA
|
Posted: Sat Jan 03, 2009 5:25 am
Alias is annoying me to no end! |
I'm trying to create an alias that does a number of things. I pass it a variable. here is the code:
Code: |
$loc = %upper(%1)
#IF (%ismember($loc, "GW|SPIDERS|TKD|WB"))
{
#DELCLASS FadeScript/FadeAliases
sense
#VARIABLE FadeScript/Getter/FadeLoc $loc
#VARIABLE FadeScript/Getter/CurrentPosition 1
}
{
#SAY Please supply a valid argument: TKD, SPIDERS, WB, or GW
}
|
The alias is called 'getcodes' When I pass it an argument everything seems to pass fine, I can echo it out, it finds it in the %ismember list and returns the location, but for some reason it will never do the 'sense' part. It seems like it doesn't know this is a command it needs to run to the mud. So the alias doesn't really work. When looking at the code in the editor the 'sense' and the '#' on the next line are greened out like it isn't being formatted correctly. Am I doing something wrong here?
Thanks in advanced. |
|
|
|
Lina Novice
Joined: 12 Oct 2006 Posts: 49
|
Posted: Sat Jan 03, 2009 6:36 am |
I've tested out your alias and it seems to be working perfectly for me. Perhaps try using a #SEND before the 'sense', see if that helps you. Otherwise, I don't know, hopefully one of the pros can help. My only guess is that perhaps you have something else messing with this alias, another alias of send perhaps. Just in case, my code is as below.
Code: |
<alias name="getcodes" id="13">
<value>$loc = %upper(%1)
#IF (%ismember($loc, "GW|SPIDERS|TKD|WB"))
{
#DELCLASS FadeScript/FadeAliases
sense
#VARIABLE FadeScript/Getter/FadeLoc $loc
#VARIABLE FadeScript/Getter/CurrentPosition 1
}
{
#SAY Please supply a valid argument: TKD, SPIDERS, WB, or GW
} </value>
</alias>
|
|
|
|
|
whorn Wanderer
Joined: 04 May 2002 Posts: 52 Location: USA
|
Posted: Sat Jan 03, 2009 5:28 pm |
Using a #send seemed to fix the problem whatever the problem actually was :).
Thanks for the help. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|