|
jkoster Newbie
Joined: 30 Aug 2005 Posts: 6 Location: Eureka, CA, USA
|
Posted: Mon Mar 26, 2007 9:58 am
Variable / %zonename |
Hi guys.
Is it possible to set a variable to a zonename via an alias?
What I'm looking for is something to set a button caption to my recall room's zone name.
So if I'm set to recall in X city, my @recall is X (And such my caption is X).
If I set recall to Y city, my @recall is Y (And so is my button).
I'm thinking of the following. You'll see the ? where I get lost.
Quote: |
#ALIAS DoRecall {@recall = (%zonename(???))} |
Thank you! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Mar 26, 2007 10:41 am |
Well, if your zone name is just the city name, you can simply do
#alias DoRecall {recall=%1}
to set the variable with the name of the city if you DoRecall cityname. The %zonename function works on the number of the zone, which is useful for some things but not really if you're starting from the name of the city. If the name of the city isn't the name of the zone, but each city does have its own zone name then you can just run a series of #if checks to find which it is:
#alias DoRecall {#if (%1=Antioch) {recall=Anti};#if (%1=Stavenn) {recall=Stav}}
etc etc. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Mar 26, 2007 10:53 am |
I don't see where you're getting lost, hehe.
If you just give your button the name of the variable, or somesuch, ie "Recall Room in Zone @Recall".
Then your alias DoRecall, which is practically already correct: #alias DoRecall {Recall = %zonename()} |
|
|
|
jkoster Newbie
Joined: 30 Aug 2005 Posts: 6 Location: Eureka, CA, USA
|
Posted: Mon Mar 26, 2007 11:19 am |
Hm.
Here I was trying to complicate things.
Silly me.
Thanks! |
|
|
|
|
|