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
Fidel
Beginner


Joined: 07 Oct 2009
Posts: 19
Location: Poland

PostPosted: Sat Oct 24, 2009 7:14 pm   

#echo variable with %cr
 
Hi,

I have a list @arrows with texts containing %cr.

Code:
#echo %ansi($fore, $back)%expand(%db(@arrows, sw))


Shows output:
Code:
#   #
#  #
# #
##
#####



But I want to use it in alias and "sw" should be a variable.
Code:
#echo %ansi($fore, $back)%expand(%db(@arrows, $dir))


Shows:
Code:
%db(@arrows, $dir)


Without %expand
Code:
%cr#   #%cr#  #%cr# #%cr##%cr#####


Can it be done anyhow?

Thanks for your help
Pawel.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Oct 25, 2009 3:50 am   
 
Instead of putting it as a string with %cr, you could do it as a string list, then do:

Code:
%expandlist(%db(@arrows, $dir),%cr)


instead.

Just change the %crs in the database to | and you'll be all set.

Charneus
Reply with quote
Fidel
Beginner


Joined: 07 Oct 2009
Posts: 19
Location: Poland

PostPosted: Sun Oct 25, 2009 10:07 am   
 
It works :)

Thanks!
Pawel
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