 |
Brenex Beginner
Joined: 13 May 2008 Posts: 25
|
Posted: 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>
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
 |
|
|