Skip to content

条件比较右侧使用裸变量时判断错误 #1055

Open

Description

@Stakataka-3030

现象

--- >=、<= 会漏掉本应执行的分支;!= 在两个变量相等时反而判为真。

复现

在场景中写入并逐句运行:
setVar:score=10;
setVar:required=5;
setVar:hit=0;
setVar:hit=1 -when=score>=required;
:结果 {hit};
预期:显示“结果 1”。
实测:显示“结果 0”。
另外两组:
score=3、required=5,条件改为 score<=required:预期 1,实际 0。
score=5、required=5,条件改为 score!=required:预期 0,实际 1。
对照:将右侧改为数字 5、(required) 或 {required},上述三组均正常。

Activity

  1. Stakataka-3030 commented on Oct 9, 2026

    @Stakataka-3030
    Author

    第一个大于号被md格式吞掉了,加了个---来阻止,不用理会

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions