|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sun Dec 23, 2007 10:36 pm
Trigger not compiling |
Can someone please help?
I have the simple trigger: %1 says, "Choke %2"
{#if (%ismember (%1, @MyChokeCallers)){kai choke %2}}
I am getting the message: {ERROR: Trigger %1 says, "Choke %2" fired but did not compile}
I have the list var MyChokeCallers so nobody can trigger me to do the action unless they are on my list. I assume it doesn't like the %1 %2 thing or wants brackets or quotes. I am used to thinmgs not working but somthing not compiling is a different story. Please help.
Thanks in advance |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun Dec 23, 2007 10:46 pm |
It should be
Code: |
#trigger {(%w) says, ~"Choke (%w)~"$} {#if (%ismember(%1,@MyChokeCallers)) {kai choke %2}}
|
You didn't have a space between if clause and the command initiated if its true.
You shouldn't use %1-%99's inside the *trigger pattern*. As I don't use CMud yet, I don't even know if its possible there anymore (it was in ZMud because it was lax about things like that).
EDIT: to add tildes before quote chars. Might be a correct thing to do.
Prog |
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sun Dec 23, 2007 11:51 pm |
It didn't work at all and I added a period. Now I get:
ERROR: Trigger (%w) says, ~"Choke (%w).~"$ fired but did not compile |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Mon Dec 24, 2007 3:11 am |
Is there supposed to be a period in the trigger line? If not, then this worked for me, see if it'll work for you.
Code: |
#trigger {(%w) says, ~"Choke (%w)~"} {#if (%ismember(%1, @MyChokeCallers)) {kai choke %2}} |
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Dec 24, 2007 9:41 am |
Don't forget to put the space between the @MyChokeCallers)) and the {kai choke %2}}. In your example, you don't have one. Follow iljhar's example above, and you should have no problem, provided you have items inside your @MyChokeCallers variable.
Charneus |
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Tue Dec 25, 2007 2:14 pm |
Actually I had to include the period and get rid of the ? to get it to work.
Thanks for the help. It got me pointed in the right direction. |
|
|
|
|
|