5

Because there are so many questions asking about this, but not closed as duplicates, I decided to make a uniting question here:

There are two three four basic situations here:

  • Why does the /testfor command (I have) always output an error (not listed below)?

  • Why does the /testfor command (I have) always output the entity UUID is an invalid format?

  • Why does the same /testfor command sometimes output the entity UUID is an invalid format instead of found [x] and sometimes not?

  • Why does the /testfor command not output anything?

1
  • Please use this as a reference point to any other users asking something from this list.
    – user143228
    Sep 30, 2016 at 16:04

1 Answer 1

2

This happens when the command finds no entities that fit into all the parameters and conditions you entered - it's just a false output. For example, if you enter

/testfor @e[type=ThisIsNotAValidEntityType]

it will always output an error (case 1 above). If you want to stop this showing, edit the command so that it "fits" at at least one entity or place an entity so that it fits the commands.


This command will aslo always output an error, but this time the error will always be the entity UUID is an invalid format (case 2 above):

/testfor @p[score_x_min=3,score_x=2]

On the other hand, if you type a command like so:

/testfor @e[type=Creeper,c=-1]

you will get a false output (the entity UUID us an invalid format) only if the farthest entity from you isn't a Creeper (case 3 above).


But, if your testfor command may theoretically target more entities, and doesn't, eg.

/testfor @e[type=Creeper]
/testfor @e[score_x_min=3,score_x=2]

then you will not get any output at all (case 4 above).

6
  • 1
    "/testfor @e[type=ThisIsNotAValidEntityType]" will output Entity type 'ThisIsNotAValidEntityType' is invalid, not The entity UUID provided is in an invalid format.
    – SirBenet
    Sep 30, 2016 at 9:45
  • @colorfusion Ah, fixed that. Now it should be OK. Thanks for noticing me.
    – user143228
    Sep 30, 2016 at 11:29
  • /testfor @e[score_x_min=3,score_x=2] & /testfor @e[type=Creeper] - These commands will not actually output anything at all if there were no targets found, due to how the command parser cycles through targets. Selectors that are not size-limited to 1 target (@p, @e[c=1], @a[c=1], @r) will not provide error output if no targets were found. If the selector is limited to 1 target, then you'll receive the error.
    – Skylinerw
    Sep 30, 2016 at 17:19
  • @Skylinerw What about /testfor @p[score_x_min=3,score_x=2] and /testfor @e[type=Creeper,c=1]
    – user143228
    Oct 1, 2016 at 7:32
  • @RudolfL.Jelínek Yep, those will produce the error (the first one does due to @p limiting to 1 target, and the second one due to c=1 being specified).
    – Skylinerw
    Oct 1, 2016 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .