|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu May 22, 2008 2:06 pm
same trigger? |
I've got two triggers, when at first appearence, they look the same. However... I they are not. One has upper case, and the other has lower case. Other then that, they are identical. I have the "case sensitive" box checked, however... When working with the trigger or whatever... It prompts me that I have two of the same triggers, when... I don't. Or at least, I shouldn't. Very confused. TIA!
Code: |
<trigger priority="430" case="true" newline="false" prompt="true" id="43">
<pattern><![CDATA[^~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]]]></pattern>
<value>#if (@bkill = 1) {#if (@bcombat) {#if (@bdetect = 0) {act} {move}}}</value>
</trigger>
<trigger priority="429" case="true" newline="false" prompt="true" id="292">
<pattern><![CDATA[^~[h:&%dhit_cur/&%dhit_max] ~[m:&%dman_cur/&%dman_max] ~[s:&%dspi_cur/&%dspi_max] ~[e:&%dend_cur/&%dend_max]]]></pattern>
<value>#if (@bkill) {#var bdetect 0}</value>
</trigger> |
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu May 22, 2008 2:57 pm |
Good point; I guess this is ignoring the case sensitivity option. You can get around it for now by giving one or both of the triggers IDs.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu May 22, 2008 3:12 pm |
This a bug? I can give them ID's no issue there. Thanks!
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed May 28, 2008 7:37 pm |
Yes, CMUD is comparing the Name field of the settings in a case insensitive way, since that is how they are stored in the internal hash table. The case sensitivity option for triggers is only used by the trigger tester and doesn't have any effect on how settings are searched for in the internal hash table.
For example, if you do this:
Code: |
#TRIGGER {test} {my command}
#TRIGGER {TEST} {my new command} |
you will actually overwrite the first trigger and will *not* create a new trigger with different case, regardless of the case sensitivity of the trigger. This is true of all settings (aliases, variables, etc). CMUD is generally not case sensitive. So yes, as Fang mentioned, if you want to do something like this, you need to assign a unique ID to each trigger. |
|
|
|
|
|