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


Joined: 04 Oct 2013
Posts: 1

PostPosted: Fri Oct 04, 2013 9:36 pm   

Triger with #key and Wildcard problem
 
Hi,

I noticed that some of my scripts are not working after moving from zmud to cmud.

I use trigger that is creating macros:

#key CTRL-@numerteam {zaslon %if( %numwords( %1)=4, %lower( @mnabprz(%word(%1,1))) @mnabprz(%word(%1,2)) @mnabprz(%word(%1,3)) @mnab(%word(%1,4)), %if( %numwords( %1)=3, %lower( @mnabprz(%word(%1,1))) @mnabprz(%word(%1,2)) @mnab(%word(%1,3)), %if( %numwords( %1)=2, %lower( @mnabprz(%word(%1,1))) @mnab(%word(%1,2)), %if( %numwords( %1)=1, %lower( @mnab(%1))))))}

In result I get wildcard reference in #key so it's not working:
zaslon %if( %numwords( %1)=4, %lower( @mnabprz(%word(%1,1))) @mnabprz(%word(%1,2)) @mnabprz(%word(%1,3)) @mnab(%word(%1,4)), %if( %numwords( %1)=3, %lower( @mnabprz(%word(%1,1))) @mnabprz(%word(%1,2)) @mnab(%word(%1,3)), %if( %numwords( %1)=2, %lower( @mnabprz(%word(%1,1))) @mnab(%word(%1,2)), %if( %numwords( %1)=1, %lower( @mnab(%1))))))

Any idea how I can pass %1 value to #key?

Thanks.
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Sat Oct 05, 2013 1:36 pm   
 
Put the argument in a local variable:
$kogo = %1
Then replace all %1 with $kogo.



Ale ogólnie radziłbym załatwić konfig na cmuda, albo napisać wszystko od nowa, bo takie przenoszenie zwykle i tak nie wychodzi. Poza tym ten kod jest kieski, pisany przez laika.
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