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
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: 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
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: 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
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: 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
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: 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}}
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: 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.
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