Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Oct 24, 2002 12:39 pm |
The mapper functions that allow you to change the value of soemthing have an optional final argument. If this argument is present, then it sets it to that value. In the example of %zonename, you can get the name of a zone by doing:
#VAR zname %zonename(zone)
I'm not entirely sure, since I can't test it right now, but I believe that zone is the number of the zone. You can find out the number of a zone by using %zonenum. Also, as with other mapper functions, you should be able to leave this argument blank to signify the current zone. Thus, to get the name of the current zone you do:
#VAR zname %zonename()
To set it, you have to specify the optional second argument. This should work:
#NOOP zname %zonename(zone, newName)
Notice that I use #NOOP, because functions are never called by themselves. they are colled within the context of a command, and since we don't care what the function returns in this case, we use #NOOP which executes any functions but discards whatever they return.
Finally, as mentioned above, you should be able to leave the first argument blank to signify the current zone and thus, change the name of the current zone:
#NOOP %zonenamep(, newName)
Kjata |
|