上一个(%)命令在Rivescript游乐场测试中引发错误?

时间:2019-01-15 11:44:31

标签: chatbot rivescript

我正在Rivescript上创建一个约会应用聊天机器人,并尝试使用%previous命令来触发有关安排日期的条件性主题,但是当我尝试使用%previous命令时,我得到了附加的错误消息,通知我不能将%用作触发器。

这是我得到的错误:Error in your RiveScript code: Syntax error: Triggers can't contain uppercase letters, backslashes or dots in UTF-8 mode at stream() line 186 near % thats funny. wanna hang out sometime?我在这里使用'Rivescript Playground':https://play.rivescript.com/-为了方便起见,我粘贴了下面的相关代码,但错过了替代方法< / p>

+ hello
- hey!{weight=5}
- hey cutie{weight=2}
- hey ur cute{weight=1}
- hey ur cute, wanna go on a date?{weight=1}

+ hey
@hello

+ yo
@hello

+ good *
@hello

+ hey*
@hello

+ [*] hows your [*] going
- it is going well thank u. and u?
- it is good. how is urs?
- i am enjoying myself. and u?

+ how are you
- i am well. and you?
- i am fine, how r u 
- not too bad thanks. how are you babe?
- enjoying my day thank you

+ my name is *
- <set name=<formal>>Nice to meet you, <get name>.

+ *
- sorry, i don't understand
- can you rephrase that babe
- ur cute 
- how can u be so cute
- thats funny. wanna hang out sometime?

+ *
% thats funny. wanna hang out sometime?
== [*]no[*]
== [*]yes|ok[*]{topic=date}

> topic date

< topic

1 个答案:

答案 0 :(得分:0)

根据错误消息和GoDoc文档,您不能在UTF-8模式下使用圆点。

  

语法错误:触发器不能包含大写字母,反斜杠或   UTF-8模式下的点

由于触发字符串包含一个点而引发错误。

% thats funny. wanna hang out sometime?