AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How to output the ~placenumber value of a number?
 
 

Hi,

If I have a number (say 3) how would I get chatscript to print out its’ ~placenumber?
My chatbot askes the user for a number and then needs to loop from 1 until the user specified number, printing out the ~placenumber of each iteration.
So if the user says 3, I would like the chatbot to print out “First, Second, Third”.

Any idea how to do that?

Thank you,
Pavel

 

 
  [ # 1 ]

Depends on how far you expect to go. Sounds like really small. So just build a table:
table: place(^number ^name)
createfact(^number place ^name)
DATA:
1 first
2 second
3 third
4 fourth
etc.

then query(direct_sv $$numval place ? )  @0object

 

 
  [ # 2 ]

OK, great. Thanks

 

 
  login or register to react