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


Joined: 27 Mar 2007
Posts: 20

PostPosted: Mon Jun 08, 2009 1:14 pm   

[Solved]#alias parametrs
 
why when i have: #alias sfor {#va sensesource %1 %2}
when i type: sfor tell xxx
it only puts 'tell' into sensesource variable, why not 'tell xxx'?
and what I need to do to put both words or more? it appear only to get first parametr
thanks


Last edited by wojciech_warmuz on Mon Jun 08, 2009 1:20 pm; edited 1 time in total
Reply with quote
wojciech_warmuz
Beginner


Joined: 27 Mar 2007
Posts: 20

PostPosted: Mon Jun 08, 2009 1:20 pm   
 
Ok i found it %-1 will do it
:)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jun 08, 2009 2:19 pm   
 
As for why it was behaving that way in your first try, it is because it was treating %1 as the second parameter, and %2 as the third parameter. From the documentation, the syntax for #var is:
#VA varname value defaultval classname

So, when you did {#va sensesource %1 %2}, %1 was being set as the value, and %2 was being set as the default value. To get it to work the way you wanted, you could do: {#va sensesource %concat(%1, " ", %2)}
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