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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4772
Location: Pensacola, FL, USA

PostPosted: Sat Feb 09, 2008 10:43 am   

[2.18] #SUB confusion
 
#VAR killable {ogre|orc|troll|giant|goblin}
#TR {%q({@killable})%q} {#SUB {<send 'kill %params'><color orange>%params</color></send>}}
#echo @killable

Seems to only work properly the first time it happens per line.
All other instances copy the first.
_________________
Discord: Shalimarwildcat
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Feb 09, 2008 5:40 pm   Re: [2.18] #SUB confusion
 
While that could be a bug and is a little strange below is the way you should be wording this trigger. And it works properly too.
Code:
#VAR killable {ogre|orc|troll|giant|goblin}
#TR {%q({@killable})%q} {#SUB {<send 'kill %1'><color orange>%1</color></send>}}
#echo @killable
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4772
Location: Pensacola, FL, USA

PostPosted: Sat Feb 09, 2008 10:24 pm   
 
%params is supposed to be equivilent to %0 and should include %1

logically my code should work as well
_________________
Discord: Shalimarwildcat
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Sun Feb 10, 2008 12:13 am   
 
Aren't there some strange effects with trying to match more than once per line? That's what the "repeat within line" option is supposed to handle, I think. The original example works fine when that is turned on.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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