Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Fri Mar 09, 2007 3:26 am   

Silly variable question
 
I have an alias which prepares and then targets a specific body part of a mob. The body part is input as an argument when the alias is called.

Example input:

ael left leg

Alias name: Ael

Script: #var bpart (%1 %2)
prep ael 5
#alarm +5 target (@bpart)

Now for some reason it outputs "target leftleg" instead of "target left leg"

I was hoping to have the proper output without having to resort to a second variable.
Is there a way to have it keep the space between left and leg?

EDIT: CMud ver 1.26
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Mar 09, 2007 3:40 am   
 
You should only be using brackets when you want what's in them to be evaluated. You don't in this situation, so use this:

Code:
#var bpart {%1 %2}
prep ael 5
#alarm +5 {target @bpart}

which fixes it right up for me.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Fri Mar 09, 2007 3:45 am   
 
Thanks Fang Xianfu. I had initially tried to use braces but had forgotten to place them around "target @bpart".
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net