mojira.dev
MC-53261

Command block illogic

Put the summary of the bug you're having here

What I expected to happen was...:
I expected to run the test for command and have it work fine
What actually happened was...:
I ended up either never being found or being found without the right requirements.

Steps to Reproduce:
I don't exactly know how to reproduce this side it seems to only happen to me and everyone else has no issues (that i've seen)

Attachments

Comments 9

First bracket after "@a" is wrong.

on the wiki it says if you do there "< >" its a required command while "[ ]" is optional.

Correct, that is how you identify parts of the command, not what brackets should be placed in the command.

ok then should the command be written like this then: "[x=18,y=39,z=8,r=100,<team=Blue,score_Name=300>]" or is that still wrong?

It would be:

testfor @p[x=18,y=39,z=8,r=100,team=Blue,score_Name=300]

When angle brackets < > and square brackets [ ] are listed in a command usage, like...

testfor <player|entity selector> [dataTag]

...they just mean player or entity selector is required, and a dataTag is optional (like @unknown said). But keep in mind, those brackets have nothing to do with what brackets go on the actual command. It's just an abstract thing, telling you what's required and what's not.

To be clear, two things: a real command never has angle brackets, and your command has no dataTags. A dataTag would be surrounded by curly brackets { }. Your command has just the player selector, and a selector is allowed to have square brackets, which yours does.

I do: "testfor @p[x=18,y=39,z=8,r=100,team=Blue,score_Name=300]" and even if score_Name doesn't = 300 it still says it found me, check first screen shot

@Ricardo, the first screenshot obviously says that it found you, what's the problem?

"score_Name=300" means score of 300 or lower.

thanks you sir you have fixed the problem 😃

Ricardo

(Unassigned)

Unconfirmed

Minecraft 14w11b

Retrieved