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
nwsk
Newbie


Joined: 07 Jan 2008
Posts: 5

PostPosted: Sat Feb 27, 2010 8:48 am   

Expanding vars, in porting from zmud
 
Hi,

Trying to make a switch from zmud to cmud,

Used to have an alias that would run as so

checkreason name
#SHOW %1 is listed for reason: @%1reason
-> name is listed for reason: blahblahblah (where blahblahblah is the value of @namereason)

In cmud however, it will not expand @namereason, i've tried using %expand(@%1reason) which doesn't appear to do anything,
and local vars(not too familiar with how those so might be wrong).

$reason = %concat(%1,reason)
#SHOW %1 was listed for reason: %expand(@$reason)

Thanks!
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Feb 27, 2010 2:31 pm   
 
Use:

#SHOW %1 is listed for reason: @{%1reason}

Charneus
Reply with quote
nwsk
Newbie


Joined: 07 Jan 2008
Posts: 5

PostPosted: Sat Feb 27, 2010 3:12 pm   
 
Great, thanks :)
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