Need help with srai and passing star

  • 2 Replies
  • 1401 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6179
  • Mostly Harmless
Need help with srai and passing star
« on: January 30, 2013, 10:40:03 pm »
I have this code :

Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<aiml version="1.0">

<category>
<pattern>MUSIC *</pattern>
<template><srai>MP3</srai></template>
</category>

<category>
<pattern>MP3 *</pattern>
<template>I will play <star index="1"/></template>
</category>
</aiml>

But it only partly works.

If I type 'MP3 some song' the bot will say 'I will play some song'.

I tried to use srai but I can't seem to figure out how to pass the * to the category so that this also works : 'Music some song'

Cheers   :)


*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6179
  • Mostly Harmless
Re: Need help with srai and passing star
« Reply #1 on: January 30, 2013, 10:56:38 pm »
Nevermind, found it :

Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<aiml version="1.0">

<category>
<pattern>MUSIC *</pattern>
<template><srai>MP3 <star/></srai></template>
</category>

<category>
<pattern>MP3 *</pattern>
<template>I will play <star index="1"/></template>
</category>
</aiml>

I didn't put <star/> in the first pattern..  :idiot2:
« Last Edit: January 31, 2013, 11:20:35 am by Freddy »

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Global Moderator
  • *******************
  • Prometheus
  • *
  • 4512
Re: Need help with srai and passing star
« Reply #2 on: February 01, 2013, 12:52:55 am »
Freddy,

You've confirmed it...you really ARE your own best friend!! ;)
In the world of AI, it's the thought that counts!

 


Users Online

27 Guests, 1 User
Users active in past 15 minutes:
Freddy
[Administrator]

Most Online Today: 33. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles