|
Oddwin Newbie
Joined: 04 Aug 2011 Posts: 7
|
Posted: Thu Aug 04, 2011 8:41 pm
Color trigger issue |
I am having a problem with Cmud.
I am using the Wizard to make a trigger that colors just 1 word on the mud.
So..
I press CTRL-T
Select "Change the color of certain words from teh MUD"
Press Next
Type [Rare]
Press Next
Select the color I want displayed
press Next
Confirm the trigger. #TRIGGER {{[Rare]}} {#CW "11"}
Press Finish
and nothing changes.
Anyone know what I am doing wrong? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Aug 04, 2011 9:12 pm |
Umm, stupid question time. Are you generating new lines with the phrase "[Rare]" in it? Triggers are not retroactively applied to lines that appeared prior to the trigger creation, so obviously nothing would change when you press Finish.
Beyond that, you have too many sets of {}. If the phrase you want to color is "{[Rare]}", then you need to use the quote character on both the inner set of {} as well as the []. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Thu Aug 04, 2011 10:02 pm |
Well, that looks like an issue with the trigger wizard. If there's only one word you want to color, it probably shouldn't wrap it in {}, though it doesn't really affect it. The big problem is that it should be quoting special characters in the pattern. For the time being, this trigger should do what you want:
Code: |
#TRIGGER {~[Rare~]} {#CW "11"} |
|
|
|
|
Oddwin Newbie
Joined: 04 Aug 2011 Posts: 7
|
Posted: Fri Aug 05, 2011 12:38 am |
MattLofton wrote: |
Umm, stupid question time. Are you generating new lines with the phrase "[Rare]" in it? Triggers are not retroactively applied to lines that appeared prior to the trigger creation, so obviously nothing would change when you press Finish.
Beyond that, you have too many sets of {}. If the phrase you want to color is "{[Rare]}", then you need to use the quote character on both the inner set of {} as well as the []. |
absolutely nothing changes, and I am not writing the trigger, I am using the wizard.. so the program itself is writing that..
Quote: |
Well, that looks like an issue with the trigger wizard. If there's only one word you want to color, it probably shouldn't wrap it in {}, though it doesn't really affect it. The big problem is that it should be quoting special characters in the pattern. For the time being, this trigger should do what you want: Code:
#TRIGGER {~[Rare~]} {#CW "11"} |
No go :( |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Fri Aug 05, 2011 11:28 am |
Try removing the quotes on the color number #CW 11 should work fine unquoted
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Fri Aug 05, 2011 2:18 pm |
Both work fine for me, in CMUD 3.34.... I actually do test all my code before I post anything here, FYI. I would never post something that doesn't work.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Aug 05, 2011 6:18 pm |
Code: |
#TRIGGER {{~[Rare~]}} {#CW 11} |
works for me here. Looks like the trigger wizard is not properly quoting special characters like [ and ]
The extra {} don't have any negative impact so it doesn't hurt to use them, especially if you later plan to add additional words to the color list.
Also, nothing will change on the screen until you receive new text with the [Rare] in it. |
|
|
|
Oddwin Newbie
Joined: 04 Aug 2011 Posts: 7
|
Posted: Sun Aug 07, 2011 2:36 am |
Fixed it .. thank you so much gang :P
|
|
|
|
|
|