Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-123331

'execute if/unless score' sets the score to 0 if unset

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      Using /execute if/unless score and testing for players which do not have a score sets 0 for them and the test succeeds.

      Expected would be that the comparison failed and no score was set.

      How to reproduce

      1. Create a new objective called something like test
      2. Run the following to set the value to test with
        /scoreboard players set value test 0
        
      3. Run
        /execute if score something test = value test run say test
        

        The command runs successfully even though the player "something" hasn't been initialized in the objective "test"

        Attachments

          Activity

            People

            • Assignee:
              dinnerbone [Mojang] Dinnerbone (Nathan Adams)
              Reporter:
              chokoboy3 alexander Thomsen
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: