0

My friends and I are building a Christmas themed adventure map and one of the 5 challenges is a Grinch battle. It is a Zombie with an invisible guardian on top and the head of a monster. The Guardian and Zombie both have loads of Attributes. In the command block I put:

/summon Guardian 57 68 381 {ActiveEffects:[0:{Id:14,Duration:9999999,Amplifier:1,ShowParticles:0}],Attributes:[{Name:generic.maxHealth,Base:200},{Name:generic.attackDamage,Base:10}], Riding:{id:Zombie, Attributes:[{Name:generic.maxHealth,Base:200},{Name:generic.movementSpeed,Base:0.2},{Name:generic.attackDamage,Base:10}],{CustomName:Boss,CustomNameVisible:1,Attributes:[{},{},{}],Equipment:[{},{},{},{},{id:skull,Damage:3,tag:{SkullOwner:MHF_Blaze}}],CustomName:Grinch,CustomNameVisible:1}}}

It should in theory work but it doesn't in the bottom of the command block it says this:

Data tag parsing failed: Unable to locate name/value separator for string: {CustomName:Boss,CustomNameVisible:1,Attributes:[{},{},{}],Equipment:[{},{},{},{},{id:skull,Damage:3,tag:{SkullOwner:MHF_Blaze}}],CustomName:Grinch,CustomNameVisible:1}

Please can someone help!

2

There are superfluous curly braces ({}) around the erroneous string. Remove those. Also, you specify the Zombie's CustomName and CustomNameVisible twice.

When facing data tag syntax problems, it is often helpful to explode the view in a suitable text editor that supports syntax highlighting, such as Notepad++.

Riding:
{
    id:Zombie, 
    Attributes:[
    {
        Name:generic.maxHealth,
        Base:200
    },{
        Name:generic.movementSpeed,
        Base:0.2
    },{
        Name:generic.attackDamage,
        Base:10
    }],
    {
        CustomName:Boss,
        CustomNameVisible:1,
        Attributes:[{},{},{}],
        Equipment:[{},{},{},{},{id:skull,Damage:3,tag:{SkullOwner:MHF_Blaze}}],
        CustomName:Grinch,
        CustomNameVisible:1
    }
}

You can easily see that after closing Attributes, you start a compound tag (open curly braces), but there's no tag to assign this value. Remove these braces, and CustomName: ... is correctly the same level as id and Attributes.

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.