[alicebot-style] Problem with get and pattern

Kim Sullivan alicebot at seznam.cz
Mon Mar 13 14:45:00 PST 2006


Hi,

> This example doesn't work because I think that you can't put a get element
into a pattern, don't you?
> Do you think that there is a way to make it work?
> Or maybe, is there a different approach to work it out?

There is probably a different way to work it out, but from your examples I
am not really sure what you are trying to achieve. Setting the variable is
clear, but why do you want to match it later and respond to it "this is the
value of X"?

So, what exactly are you trying to do, what is X, and what should the bot do
(how to reply) once it matches X?

Also, have you considered the following case, how would you expect it to
work?

<category>
 <pattern>Set X and Y to *</pattern>
 <template>
  <think><set name="x"><star/></set><set name="y"><star/></set></think>
  </template>
</category>

<category>
 <pattern><get name="x"/></pattern>
 <template>This is the value of X</template>
</category>

<category>
 <pattern><get name="y"/></pattern>
 <template>This is the value of Y</template>
</category>

Kim



More information about the alicebot-style mailing list