aichaos / rivescript-js

A RiveScript interpreter for JavaScript. RiveScript is a scripting language for chatterbots.
https://www.rivescript.com/
MIT License
377 stars 145 forks source link

Nest Object macro call errors #375

Closed lee-orr closed 2 years ago

lee-orr commented 2 years ago

I have run into a few errors with nested object calls - where the result of any inner calls is an "Object not found" error.

Here is a minimal reproducing case:

> object wrapper javascript
return "_" + args[0] + "_";
< object

> object add_hello javascript
return "hello:" + args[0];
< object

+ works *
- <call>wrapper <star></call>

+ object not found *
- <call>wrapper <call>add_hello <star> </call></call>
lee-orr commented 2 years ago

Closing since I think it's a symptom of #376