I am trying to create a "disease" in minecraft. What I am doing is setting an entities score to 1 if they have the disease, then testing if they have that disease, if they do, it would set several other scores for the effects of the disease. Then I tried to make said disease contagious. If, say a zombie is infected by the disease, and I walk near it, it works perfectly fine and I get infected. What doesn't work is if said zombie walks past another mob, the other mob isn't infected. I can't figure out why. Here is the code:

/execute @e[score_Death_min=1] ~ ~ ~ /scoreboard players set@e[score_Death=0,r=3,c=100] Death 1

And here is the error message:

[12:11:58] Failed to execute '/scoreboard players set @e[score_Death=0,r=3,c=100] Death 1' as Test Subject
  • 1
    Sorry, please correct me if I'm wrong - But might this not be better over at stackoverflow.com – Alexander Craggs Mar 24 '15 at 16:33
  • 3
    This is...sorta iffy. The commands are in-game, so I suspect this is something we can help with. – Frank Mar 24 '15 at 16:41
  • @Frank You're right, and there are probably a bunch of people who are programmers who go on this stack exchange site. – Alexander Craggs Mar 24 '15 at 16:44
  • 1
    @PopeyGilbert It has less to do with people being programmers, and more that in-game commands cater more to gamers than programmers. – Frank Mar 24 '15 at 16:56

If that's actually the command you're using, there needs to be a space between the set and @e.

I'm not sure what your intending with the c argument. It shouldn't matter for the most part, but it seems useless and will only cause potential problems.

Make sure that the conditions are actually matched. Are the entities within 3 blocks? Is their "Death" score 0 (and not Null, which it starts as if not set to anything)?

The error message you are getting will happen even if the command is working as expected. After it sets the death score of nearby entities to 1, the command will fail because @e[score_Death=0,r=3,c=100] no longer targets anything. So make sure that it's this command that's actually the issue and not something else in your mechanism; this command could be working fine.

  • 1
    I added the c argument to see if it would help. I guess I forgot to remove it. I didn't know that the score starts off at null. Thanks for your help. – thezi3 Mar 24 '15 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.