-2

This question already has an answer here:

I have been trying to make a minigame and I need custom npc's I need them to have a name, trades and infinite trades(they never run out).

Here is the command I have been using:

/summon Villager ~ ~3 ~ {Profession:3,Career:1,CarrierLevel:100{Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",Count:5},maxUses:9999999,sell:{id:"gold_ingot",Count:1}},{buy:{id:"minecraft:barrier",Count:1},sell:{id:"minecraft:barrier",Count:1}}]},CustomName:"John Smith",CustomNameVisible:100

but it says:

[14:12:38] Data tag parsing failed: Expected '}' but got '{' at: ...ession:3,Career:1,CarrierLevel:100{<--[HERE]

How should I fix it?

marked as duplicate by Fabian Röling, arghtype, Studoku, nine, Virusbomb May 21 '18 at 13:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

The error points to the problem:

CarrierLevel:100{Offers:{Recipes:

There should be a comma between CarrierLevel and Offers. There should not be a curly bracket before Offers. In the command you posted, you were also missing a closing curly bracket at the end of the command.

Here is the fixed command:

/summon Villager ~ ~3 ~ {Profession:3,Career:1,CarrierLevel:100,Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",Count:5},maxUses:9999999,sell:{id:"gold_ingot",Count:1}},{buy:{id:"minecraft:barrier",Count:1},sell:{id:"minecraft:barrier",Count:1}}]},CustomName:"John Smith",CustomNameVisible:100}

Here he is:
John Smith

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