gpt4 book ai didi

krl - 在我的 KRL 代码中出现 "Can' t use an undefined value as an ARRAY reference"错误

转载 作者:行者123 更新时间:2023-12-02 00:36:37 26 4
gpt4 key购买 nike

当我运行我的 Kynetx 应用程序时,出现以下错误:

Can't use an undefined value as an ARRAY reference at /web/lib/perl/Kynetx/Persistence.pm line 284, <GEN0> line 465. 

我的代码如下所示:

rule page_loaded is active {
select when pageview "manticore.*" setting()
pre {
savedName = current ent:userName;
}
if (savedName neq "") then {
notify("Hello #{savedName}!!","Welcome back!") with sticky = true;
}
notfired {
raise explicit event name_not_saved_yet;
}
}

我之前让这段代码正常工作,但不确定现在是什么原因导致它失效。

更新:来自调试信息。

// 2010/12/07 16:45:31 DEBUG Scheduler.pm a57x4 clear_saved_name Schedule iterator returning email_client with current RID count 0 and current rule count 3
// 2010/12/07 16:45:31 DEBUG Rules.pm a57x4 email_client Rule email_client is active
// 2010/12/07 16:45:31 DEBUG Rules.pm a57x4 email_client [selected] email_client
// 2010/12/07 16:45:31 DEBUG Rules.pm a57x4 email_client
//------------------- begin rule execution: email_client ------------------------
// 2010/12/07 16:45:31 ERROR Rules.pm a57x4 email_client Ruleset a57x4 failed: Can't use an undefined value as an ARRAY reference at /web/lib/perl/Kynetx/Persistence.pm line 284, <GEN0> line 6.

最佳答案

我们改变了存储轨迹的方式。我会尽快修复错误。

如果我向你展示一些 secret 功能,你需要保证不告诉

对于你的实体变量尝试语法(如果你有一个变量 myUserName):

 set ent:userName myUserName

然后,对于您的示例,您可以这样写:

pre {
savedName = ent:userName || "";
}
if (savedName neq "") then ....

当我们发布修复时我会更新这个答案

关于krl - 在我的 KRL 代码中出现 "Can' t use an undefined value as an ARRAY reference"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4371942/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com