Mojira Archive
MC-73118

Cannot test for " score= "

First, this is a bug, say what you want! And I will keep saying that until Searge answers on reports he closes!

As these reports all get closed and I didn't get an answer, I see it necessary to create this:

Why is this a bug?
Well the question is pretty simple, so please read the complete report
This is a bug, because like probably some of you already know, you can use

/testfor @p[team=]

This returns the nearest player without a team.
Well now look at the attached screenshot, it shows how scoreboard entries are saved. What you will see is, that scores and teams are saved the exact same way.
But for some reason you cannot test for players with new reset scores:

  • /testfor @p[score_Test=0] (Won't work when player has no score for Test)
  • /testfor @p[score_Test=]
  • /testfor @p[score_Test=null] (This should/could maybe also work, because when the game doesn't finds a score, the return is probably null)

Questions:
I guess these are all the questions you would ask, so please read them before commenting

  • Don't you respect Searge's decission?
    I do, (or better I would do), if he wouldn't close tons (! ) of reports with "Won't fix" or "Works as intended" and then doesn't comment on them or just copies there the code piece, I mean we are not programmer (at least most of us) and we don't understand this (at least probably most of us). What I have against the "Won't fix" and "Works as intended" is, that they are most of the time for real bugs, but only minor ones.
    I really want to help getting Minecraft bug-free, but when we end in 5 years with 200 "minor" bugs, Minecraft isn't anymore fun to play. Searge should instead add a category like "Minor bugs" which he can fix maybe one per month or so.
  • Why do you need to test for entities with a new created score? Nobody needs that!
    Well, probably most of the players does indeed not need this, but the ones who create great adventure maps, minigames etc. need this. And here comes the problem, the ones who don't need this love adventure maps, minigames etc. See the problem?
    The problem is also, that you have to "initialize" some stuff, like the score, but this bug makes it impossible to do this directly.
    Example:
    Every new player gets the New score of 1, and then every player with New score of 1 gets the message: "Hi there hope you like this server!"
    And after this the New score of every player with a New score of 1 gets set to 2.
    Well, how do you now set the score of New to 1?
    The player has just joined, so his New score is "blank", how can you directly detect this? You can't because of this bug!
    You have to use something like this /scoreboard players set @a New 1
    What does this mean? Even if you got the message, your score will get set to 1 again, you get the message again and so on...
  • But there are workarounds! / Why do you use the word "direct"?
    Yes there are workarounds. With them you can indirect test for a player without a score:
  • Teams: Like I wrote, this function works with teams (/testfor @p[team=]) and because every new player is in no team, this would work
    So what is the problem? Well the problem is that you cannot use teams then anymore for other stuff, for example when you reset a score, you also have the player (or entity) to leave the team
  • CustomName's or other tags: You can for example spawn a pig with the name "Test", then you set the score of New for the pig (detected by name "Test": /testfor @e[name=Test] to 1 and use
    /entitydata @e[type=Pig,name=Test,score_New=1,score_New_min=1] {CustomName:"TestUsed"}

    I guess you already see the problem: It doesn't work with players
    Also as addition, both of the methods are way more laggy and also not so reliable

  • I don't care about this problem, I also don't play adventure maps and this stuff
    Well first you are then probably wrong at this bugtracker, because you have to care here about problems, second it is an act of kindness to care about this.
  • Searge said it is "Works as intended" and so it is!
    Well, then I don't know what is wrong, and I also cannot comprehend, why he thinks so (as he also never answers, it is very difficult). Just read this description a second time, or a third and maybe after another 4000 characters (which took me quite a time, so take this serious please) maybe you will understand why...

Invalid

Marcono1234

[Mojang] Searge (Michael Stoyke)

2014-10-16, 06:48 PM

2015-08-04, 06:47 PM

2014-10-16, 07:24 PM

0

5

Unconfirmed

objective, score, scoreboard, team

Minecraft 1.8.1-pre2

-