|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Sat Oct 02, 2010 1:23 am
Expanding #WALK from an alias |
I have started updating all of my "auto" scripts with the sellScript style, but I hit a snag with questLocations
I have a string with a list of locations, and a database record with their command, when the quest master tells me where the quest is, my script is supposed to quest up the locations, then send it to the mud, but its having trouble.
Code: |
<alias name="emptyQuestQueue" enabled="false" id="91">
<value>#if (@locationQueue) {
%pop({locationQueue})
}
#t- matchLocation</value>
</alias>
|
the values in @locationQueue are always in this format
#WALK 1234
Right now everything is fine until the pop command, at that point nothing happens. At first i did not have the {} around the locationQueue alias, but that did not seem to do the trick, any thoughts? |
|
_________________ <Clever text here> |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Oct 04, 2010 1:07 pm |
You cannot start a command line with a function (%functionname) or variable (@variablename). You must start the command line with a Cmud command or an alias. In this case, what you want is:
#EXEC %pop(@locationQueue)
An even better method would be to simply have the room number in your database variable, and use:
#WALK %pop(@locationQueue) |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Mon Oct 04, 2010 1:49 pm |
Quote: |
You cannot start a command line with a function (%functionname) or variable (@variablename). |
Totally spaced that fact, thank you Rahab.[/quote] |
|
_________________ <Clever text here> |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Oct 04, 2010 4:37 pm |
The syntax for the %pop function is simply "%pop(listname)". For example:
Code: |
List="a"|"b"|"c"
#SHOW %pop(List) |
If this isn't what you mean then we'll need to see more of your script, and the value of locationQueue when you run into a problem.
[Edit]And this one as well apparently. |
|
_________________ Asati di tempari! |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Mon Oct 04, 2010 5:29 pm |
#WALK %pop(@locationQueue) worked perfectly. Rahab was dead on with my error.
|
|
_________________ <Clever text here> |
|
|
|
|
|