Trying to change the topic understood doesn’t work
I’m trying to find a way around it.
I’ve got a coding/syntax problem that I’d like some help with.
I’m trying to create a command to allow these type of commands:
say “Bob, where is the hammer.”
I’ve gotten as far as parsing ‘the topic understood’ which is ‘Bob, where is the hammer.’
I’d like to execute this type of saying by in the code trying this command:
ask Bob about hammer.
Include Conversation Package by Eric Eve.
I have two problems.
First, I can’t get ‘say’ working because it is already defined, so I’ve substituted ‘xsay’. This a problem, but minor. If anyone can help me with that let me know.
In the coding of xsay, I can set the current interlocutor, but I can’t redefine the topic understood so that the ‘try asking CH about it’ works.
understand “xsay [text]” as xsaying.
xsaying is an action applying to one topic.
Carry out xsaying:
let CH be Bob;
Change current interlocutor to CH;
[ none of the next steps works. ]
[ let TE be the text “piston”; ]
let TE be the printed name of TP;
[ change the topic understood to TE;]
Replace the topic understood with TE;
try asking CH about it;
[ try asking CH about “[TP]”;]
I get an error something like this:
*** Run-time problem P39: Attempt to say a snippet value which is currently invalid: words 2 to 13.
Thanks for your help.