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..

JS trigger matching - order of triggers causing mismatch
 
 

Hi there,

Again, this issue is not present in Python 1.12.3. but it appears in Javascript 1.14.0.

I find that the order of triggers can cause mistakes, specifically when the wildcard is “*”.

Please see the example. I am trying to gather variables from the user, before giving them their answer. In Python, the order of the “validation” triggers do not matter. However, in this example, the user is caught in an endless loop (it asks for uservar2 forever) even if the user inputs a yes or no response. A work-around is to move the uservar1 check to the bottom.

https://play.rivescript.com/s/EagoRoiPk9

Thanks for taking a look!

 

 
  [ # 1 ]

Thanks.

This is a known bug that’s on my to-do list. https://github.com/aichaos/rivescript-js/issues/122

It seems to keep them sorted in the original order they appeared in the source file, so the workaround for now is to rearrange them in the source until I fix the bug properly. smile

 

 
  [ # 2 ]

Excellent – glad I’m not losing my mind. Thanks for the reply.

As my source scripts grow and grow, I’m worried this bug will compound and cause debug headaches. Thanks for your help.

 

 
  login or register to react