mojira.dev
MCPE-235941

Negated scores check always fails for unset scores

The bug

The scores selector argument selects entities with specific amounts of points on provided scoreboard objectives.

When the value is inverted using !, it’s expected that the check is inverted. Since an unset score never matches any range, it’s expected that it always matches any inverted range. However, it doesn’t. Unset scores always fail in scores, whether the check is negated or not.

This doesn’t match the behavior of execute unless score, where unset scores properly pass every range.

How to reproduce

  1. /scoreboard objectives add test dummy

  2. /testfor @a[scores={test=!5}]

Expected result

It should say your name, since your score is not 5

Observed result

No targets matched selector

Comments 0

No comments.

tryashtar

(Unassigned)

1560640

Confirmed

Windows

26.10.21 Preview, 26.0

Retrieved