如果不久前发生,如何跳过活动?
不工作的代码:
Event = Something and SomethingElse and (ta.barssince(Event) > 20)
当然,它行不通,因为第一次尚未声明event
boolean变量。
也许问题应该是“ 如何检查变量是否定义”? (我试图找到答案。)
尝试失败(事件的所有信号
消失了):
Event = Something and SomethingElse
Event := Something and SomethingElse and (ta.barssince(Event) > 20)
和
Event = false
Event := Something and SomethingElse and (ta.barssince(Event) > 20)
The not-working code:
Event = Something and SomethingElse and (ta.barssince(Event) > 20)
Of course, it won't work because at first time, the Event
boolean variable is not declared yet.
Perhaps the question should be "How to check whether a variable is defined or not"? (I have tried to find the answer.)
Failed attempts (all the signals of the Event
disappear):
Event = Something and SomethingElse
Event := Something and SomethingElse and (ta.barssince(Event) > 20)
and
Event = false
Event := Something and SomethingElse and (ta.barssince(Event) > 20)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
var
计数器。当您的事件发生并增加否则,将其重置。You can use a
var
counter. Reset it when your event takes place and increase it otherwise.