IActions (Independent Actions) with spaces

Does anyone know if there is a way to make IActions with more than one word in the syntax (i.e. with a space)? When I try to make one and then use it while playing, the parser says, "The story doesn’t understand that command " but not “The word “insert first word here” is not necessary in this story” like it would if I had not made the verb at all.
If I change the command to one word in the verb rules, it works perfectly though. Is there any way to make an IAction with a space, and if so, does anyone have a guess for what I could be doing wrong?

I do know that words have to be in seperate strings when defining verbs, but without looking at your verb definition, I can’t tell for sure.

1 Like

Hi,

I’m not entirely sure I understand what you’re trying to do, but here is a snippet of code in my WIP that might help. I don’t think everything is needed in VerbRule, but I just copy/paste stuff that works. :slight_smile:

//      M A K E  C A L L
DefineIAction(MakeCall)
    execAction(cmd) { 
      if (!cellPhone.broken)
        "I never liked to call people when I was in the process of meeting with a client. "; 
      else
        "It's completely useless now. ";
    }
;

VerbRule(MakeCall) ('make' 'call'): VerbProduction
    verbPhrase = 'make call/making call (what)'
    action = MakeCall
    missingQ = 'what do you want to make call on'
;

I also added a MakeCallOn TAction so that make call and make call on cell both work.

If this isn’t what you’re asking, can you paste your code that you’re having difficulty with?

Thanks,
– Mike

2 Likes

This was very helpful, thanks! I just didn’t have the two words in separate strings for the verb rule. So, for example, instead of ‘make’ ‘call’ I had ‘make call’.

Thanks for all the help!