'/execute (if|unless) score' cannot compare scores that are not set
The bug
With the new /execute command syntax, the sub-commands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
- Create a new scoreboard objective and set some score on it. I'll be using a fake player named "one".
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your currently undefined score to the "one" score.
/execute if score @s foo = one foo
→
"There is no tracked player '<player>' on the scoreboard; Execute subcommand if score test failed."
Created Issue:
'/execute (if|unless) score' cannot compare scores that are not set
The bug
In the /execute command, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce
- Create a new scoreboard objective, and set some score on it. I'll be using a fake player.
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard", Execute subcommand if score test failed.
The bug
Inthe /execute command, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce
- Create a new scoreboard objective, and set some score on it. I'll be using a fake player.
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard", Execute subcommand if score test failed.
The bug
With the new /execute command syntax, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
- Set up a new world with the Upcoming Creator Features experiment enabled.
- Create a new scoreboard objective, and set some score on it. I'll be using a fake player.
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard", Execute subcommand if score test failed.
The bug
With the new /execute command syntax, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
Set upa new world with the Upcoming Creator Features experiment enabled.- Create a new scoreboard objective
,and set some score on it. I'll be using a fake player./scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard
",Execute subcommand if score test failed.The bug
With the new /execute command syntax, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
- Create a new world with the Upcoming Creator Features experiment enabled, or use an existing world.
- Create a new scoreboard objective and set some score on it. I'll be using a fake player named "one".
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your currently undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard; Execute subcommand if score test failed."
The bug
With the new /execute command syntax, the subcommands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
- Create a new world with the Upcoming Creator Features experiment enabled, or use an existing world.
Create a new scoreboard objective and set some score on it. I'll be using a fake player named "one"./scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your currently undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard; Execute subcommand if score test failed."
The bug
With the new /execute command syntax, the sub-commands if score and unless score should be able to compare scores to players that don't have their scores set. This does not work, however; an error is returned about how there is no tracked player on the scoreboard, which does not line up with behavior in Java Edition.
In Java Edition, /execute (if|unless) score can compare scores that aren't set and is often used for initializing scores. Comparing an undefined score to a value always returns false.
Steps to reproduce:
- Create a new scoreboard objective and set some score on it. I'll be using a fake player named "one".
/scoreboard objectives add foo dummy /scoreboard players set one foo 1
- Compare your currently undefined score to the "one" score.
/execute if score @s foo = one foo→
"There is no tracked player '<player>' on the scoreboard; Execute subcommand if score test failed."
Would MCPE-156279 describe your issue?
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
MCPE-156279 не решает мою проблему, там описано совсем другое
in the bedrock edition of minecraft the execute command has a different syntax. to do something withe the scores you need to do /execute @a[scores=\{scoreboars=2}] ~~~ say hi
@Chris_KR To clarify, this is on the subject of the new syntax for the /execute command. In Bedrock version 1.19.10 and newer, the syntax of /execute has been changed to reflect that of Java Edition's.
The developers are likely already aware, but just for the record: This was supposedly marked as fixed in Preview 1.19.60.25 according to the changelog, but the bug can still be reproduced.