About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Brenex
Beginner


Joined: 13 May 2008
Posts: 25

PostPosted: Tue Jun 17, 2008 5:35 pm   

[2.27] %ansi()
 
Using %ansi(8) (or any color code) and then reformatting the script box with Ctrl+M will place a space in there to be %ansi( 8) which breaks it. Specifically makes it black instead of whatever the color code specifies for.

*EDIT* Specifically it is happening to me inside a #SUB curly brackets and seems to happen anytime %ansi() is used inside {}. If you use it without curly brackets, like #ECHO %ansi(8) it works with the space.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger name="shop_links" priority="11140" regex="true" copy="yes">
    <pattern>^(\s+)(\a+)(\d+): (.+?)\s+(\d+)\s+(\d+)gp$</pattern>
    <value><![CDATA[#sub {%repeat( " ", %eval( 17-%len( %2)))%ansi(3)%2%repeat( " ", %eval( 8-%len( %3)))%ansi(11)<send  'probe %3'>%3</send> : %ansi(8)%4%repeat( " ", %eval( 45-%len( %4)))%ansi(8)%5%repeat( " ", %eval( 4-%len( %5)))%ansi(15)<send  'get %6 gold from backpack;buy%3|get %eval(%6*2) gold from backpack' 'get %6 gold from backpack|get %eval(%6*2) gold from backpack'>%6gp</send>}]]></value>
  </trigger>
</cmud>
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 17, 2008 7:52 pm   
 
Confirmed. The bug is that space isn't working within %ansi. It is normal for the reformatting to add a space before each argument in a function to make it more readable normally.

I'll add this to the list and see if I can fix it for v2.28.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jul 01, 2008 6:12 am   
 
I just checked this and it seems to be working. I tried it with the following sample text from the test trigger.

Code:
   abc123123: abc 123 xyz   123   123gp
_________________
Asati di tempari!
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