0

我正在 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/ - 我已经粘贴了下面的相关代码,但为了简洁起见错过了替代品

+ 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
4

1 回答 1

0

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

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

引发错误是因为触发字符串包含一个点。

% thats funny. wanna hang out sometime?
于 2019-01-15T13:15:20.380 回答