|
Jagged Newbie
Joined: 04 May 2002 Posts: 9 Location: Denmark
|
Posted: Fri May 07, 2004 3:43 pm
Variable problem |
Hi guys and gals,
im trying to set up an alias that will enable me to set a variable, sounds simpel enough but i've hit a snag.
my alias is:
Name: spell
value: #var spell
now here is the problem, when I write: spell fire bolt
the variable is only changed to: fire
and not fire bolt like I want it too, what am I doing wrong? |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Fri May 07, 2004 4:54 pm |
#ALIAS spell {#VARIABLE spell %-1}
Copy and paste to command line. |
|
|
|
Jagged Newbie
Joined: 04 May 2002 Posts: 9 Location: Denmark
|
Posted: Fri May 07, 2004 5:17 pm |
Didn't do the trick, when I type: spell fire bolt the variable is still only set to fire and not fire bolt
|
|
|
|
avalloch Newbie
Joined: 26 Oct 2000 Posts: 3 Location: United Kingdom
|
Posted: Fri May 07, 2004 6:07 pm |
#var spell {%1}
#var spell {fire bolt}
If you don't encapsulate the txt to go in the variable with {} it will only capture the first word. |
|
|
|
Jagged Newbie
Joined: 04 May 2002 Posts: 9 Location: Denmark
|
Posted: Fri May 07, 2004 6:28 pm |
Okay, I see im in over my head here. Could you please explain how to do it from the beginning?
I tried doing what you said avalloch but then the variable was set to {fire bolt} which didn't help me.. |
|
|
|
LungFai Beginner
Joined: 07 May 2004 Posts: 14 Location: Australia
|
Posted: Fri May 07, 2004 6:46 pm |
Newb here, Giving this one a shot cos i think i know what A guy was trying to say
Alias
Name : Spell
Value : #var spell {%1}
[8D] |
|
|
|
Jagged Newbie
Joined: 04 May 2002 Posts: 9 Location: Denmark
|
Posted: Fri May 07, 2004 6:52 pm |
Heh, that didn't do it. Same problem - the variable is set to fire and the bolt ends up as being the default value...
|
|
|
|
LungFai Beginner
Joined: 07 May 2004 Posts: 14 Location: Australia
|
Posted: Fri May 07, 2004 6:58 pm |
Wierd, if i am not mistaken (which i could be because i just started using mud clients ) the parenthises(sp) should capture whatever text you input after you fire the spell trigger. Having the variable %1 within the parenthises(sp) should signify that you are capturing any input placed after the alias spell.
Let me have a read and i will get back to you about it [8D]
Edit :
Did some reading and am not sure if Zmud assigns multiple words to 1 % variable. Thus you might have to put in %1 %2 into your value
eg
Value #Var spell %1 %2
Might be wrong though...am still reading heh |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri May 07, 2004 7:17 pm |
Make sure to delete the orignial ALIAS
#UNALIAS spell
#ALIAS spell {#VARIABLE spell {%-1}}
Copy and paste to command line.
PLEASE PLEASE PLEASE PLEASE
Read these help files FULLY from top to bottom Why make a wrong guess when you can give the right answer.
#HELP ALIAS
#HELP VARIABLE
BOTH of which explain and one in a nice pink color
Using correct brackets, %1 %-1 %-2
EDIT: added in please stuff |
|
|
|
LungFai Beginner
Joined: 07 May 2004 Posts: 14 Location: Australia
|
Posted: Fri May 07, 2004 7:30 pm |
Pooey I just finished reading the help files and was just about to post when i saw Nex's reply and went ahh Bugger the problem is solved for sure
*Heads back to going though the rest of the 255 post to find a solution to his own problems* |
|
|
|
Jagged Newbie
Joined: 04 May 2002 Posts: 9 Location: Denmark
|
Posted: Sat May 08, 2004 10:19 am |
Thanks guys your the best :)
|
|
|
|
|
|