1

Command block problem

TheNorwayPlayer's Avatar TheNorwayPlayer5/28/15 4:22 pm
1 emeralds 1.2k 21
5/31/2015 6:22 pm
TheNorwayPlayer's Avatar TheNorwayPlayer
I'm trying to make a command block perform this command, but it fails and this is the message that keeps popping up:

Data tag parsing failed: Unable to locate name/value separator for string: {buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:Bronze Sword}},{buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:Runite Longsword}}}}}}

This is the command I'm trying to make the command block do:
/summon Villager -150 5 -843 {Proffession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{buy:{id:emerald,Count:7},sell:{id:stone_sword,tag:{display:{Name:Dagger,Count:1}},{buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:Bronze Sword}},{buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:Runite Longsword}}}}}}}}]}}

Please help.
Posted by TheNorwayPlayer's Avatar
TheNorwayPlayer
Level 11 : Journeyman Explorer
5

Create an account or sign in to comment.

21

1
05/31/2015 9:58 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Haha, no need to credit me. Glad I could help you and good luck with your map.

If you have any questions regarding commandblocks, feel free to PM me for a (pretty) fast answer.
1
05/31/2015 6:22 pm
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
I put you in the project description as additional credit and also left a link to your profile page there aswell. You're an awesome guy with alot of talent, you deserve it.
Thank you for the help once again.
1
05/31/2015 8:48 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Needs an extra } at the end and it's iron_horse_armor not iron_horse_armour.

so you get this

summon Villager -179 5 -834 {Profession:3,Career:1,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_helmet,Count:1}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:iron_chestplate,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_leggings,Count:1}},{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_boots,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:chainmail_chestplate,Count:1,tag:{display:{Name:"Iron Chainmail"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_helmet,Count:1,tag:{display:{Name:"Runite Helmet"}}}},{maxUses:1000,buy:{id:emerald,Count:35},sell:{id:diamond_chestplate,Count:1,tag:{display:{Name:"Runite Chestplate"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_leggings,Count:1,tag:{display:{Name:"Runite Platelegs"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_boots,Count:1,tag:{display:{Name:"Runite Boots"}}}},{maxUses:1000,buy:{id:emerald,Count:25},sell:{id:iron_horse_armor,Count:1}}]}}
1
05/31/2015 9:32 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Thanks, you're awesome at this!
I will need to credit you when I update my map. You've been such a good help.
1
05/31/2015 8:40 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Pepijn
TheNorwayPlayer
PepijnI don't really know, I just always add it in case Minecraft screws up after a while if it's not there.

I fixed the command btw, didn't do it before because I thought the others had done it already. A lot of {} and [] were misplaced and one Count tag was within the display tag.

summon Villager ~ ~1 ~ {Profession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{maxUses:1000,buy:{id:emerald,Count:7},sell:{id:stone_sword,Count:1,tag:{display:{Name:"Dagger"}}}},{maxUses:1000,buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:"Bronze Sword"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:"Runite Longsword"}}}}]}}



Thank you, it's finaly working!
I think I see what I did wrong. Tell me if I got it right.

I put a Count:1 inside the dagger tag.
I missed 2 }s at the end of each named item.
I forgot maxUses.
I forgot quotes on the display names of the items.
I put many uneccesary }s in the end of the command.


Pretty much . A tip for the future is to immediately close every bracket you open.
Example:
{} --> {display:{},ench:[{}]} --> {display:{Name:""},ench:[{}]} --> {display:{Name:"Example"},ench:[{id:14,lvl:4}]}



Ok, I have a problem again:

/summon Villager -179 5 -834 {Profession:3,Career:1,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_helmet,Count:1}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:iron_chestplate,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_leggings,Count:1}},{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_boots,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:chainmail_chestplate,Count:1,tag:{display:{Name:"Iron Chainmail"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_helmet,Count:1,tag:{display:{Name:"Runite Helmet"}}}},{maxUses:1000,buy:{id:emerald,Count:35},sell:{id:diamond_chestplate,Count:1,tag:{display:{Name:"Runite Chestplate"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_leggings,Count:1,tag:{display:{Name:"Runite Platelegs"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_boots,Count:1,tag:{display:{Name:"Runite Boots"}}}},{maxUses:1000,buy:{id:emerald,Count:25},sell:{id:iron_horse_armour,Count:1}}]}

This error message comes up:
[12:31] Data tag parsing failed: Unbalanced brackets: {Profession:3,Career:1,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_helmet,Count:1}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:iron_chestplate,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_leggings,Count:1}},{maxUses:1000,buy:{id:emerald,Count:10},sell:{id:iron_boots,Count:1}},{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:chainmail_chestplate,Count:1,tag:{display:{Name:"Iron Chainmail"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_helmet,Count:1,tag:{display:{Name:"Runite Helmet"}}}},{maxUses:1000,buy:{id:emerald,Count:35},sell:{id:diamond_chestplate,Count:1,tag:{display:{Name:"Runite Chestplate"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_leggings,Count:1,tag:{display:{Name:"Runite Platelegs"}}}},{maxUses:1000,buy:{id:emerald,Count:20},sell:{id:diamond_boots,Count:1,tag:{display:{Name:"Runite Boots"}}}},{maxUses:1000,buy:{id:emerald,Count:25},sell:{id:iron_horse_armour,Count:1}}]}

I have looked through it, but I can't see what's wrong here. Help pls?
1
05/31/2015 6:45 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
TheNorwayPlayer
PepijnI don't really know, I just always add it in case Minecraft screws up after a while if it's not there.

I fixed the command btw, didn't do it before because I thought the others had done it already. A lot of {} and [] were misplaced and one Count tag was within the display tag.

summon Villager ~ ~1 ~ {Profession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{maxUses:1000,buy:{id:emerald,Count:7},sell:{id:stone_sword,Count:1,tag:{display:{Name:"Dagger"}}}},{maxUses:1000,buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:"Bronze Sword"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:"Runite Longsword"}}}}]}}



Thank you, it's finaly working!
I think I see what I did wrong. Tell me if I got it right.

I put a Count:1 inside the dagger tag.
I missed 2 }s at the end of each named item.
I forgot maxUses.
I forgot quotes on the display names of the items.
I put many uneccesary }s in the end of the command.


Pretty much . A tip for the future is to immediately close every bracket you open.
Example:
{} --> {display:{},ench:[{}]} --> {display:{Name:""},ench:[{}]} --> {display:{Name:"Example"},ench:[{id:14,lvl:4}]}
1
05/31/2015 6:22 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Thanks for the help everyone.

Here's the project I'm using the command for if you're curious.

http://www.planetminecraft.com/project/kingdom-defence/
1
05/31/2015 6:13 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
PepijnI don't really know, I just always add it in case Minecraft screws up after a while if it's not there.

I fixed the command btw, didn't do it before because I thought the others had done it already. A lot of {} and [] were misplaced and one Count tag was within the display tag.

summon Villager ~ ~1 ~ {Profession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{maxUses:1000,buy:{id:emerald,Count:7},sell:{id:stone_sword,Count:1,tag:{display:{Name:"Dagger"}}}},{maxUses:1000,buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:"Bronze Sword"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:"Runite Longsword"}}}}]}}



Thank you, it's finaly working!
I think I see what I did wrong. Tell me if I got it right.

I put a Count:1 inside the dagger tag.
I missed 2 }s at the end of each named item.
I forgot maxUses.
I forgot quotes on the display names of the items.
I put many uneccesary }s in the end of the command.
1
05/31/2015 5:03 am
Level 4 : Apprentice Miner
Dinglydell
Dinglydell's Avatar
For future, pasting the json (the stuff in {} brackets) into this should help determine where brackets are missing/needed.
1
05/31/2015 6:19 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
I didn't try exactly that one you put a link to, but I tried using some few json translators before I made this post. They mostly just pointed out how many mistakes I had, not what the mistakes were.
Thanks for the tip anyway.
1
05/31/2015 4:55 am
Level 19 : Journeyman Miner
anonpmc1072506
anonpmc1072506's Avatar
[deleted]
1
05/31/2015 6:16 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Yeah, still figuring out the command blocks. :/
1
05/31/2015 4:26 am
Level 1 : New Explorer
thealfredguy123
thealfredguy123's Avatar
-snip-
1
05/31/2015 6:13 am
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
snip?
1
05/31/2015 4:18 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
I don't really know, I just always add it in case Minecraft screws up after a while if it's not there.

I fixed the command btw, didn't do it before because I thought the others had done it already. A lot of {} and [] were misplaced and one Count tag was within the display tag.

summon Villager ~ ~1 ~ {Profession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{maxUses:1000,buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{maxUses:1000,buy:{id:emerald,Count:7},sell:{id:stone_sword,Count:1,tag:{display:{Name:"Dagger"}}}},{maxUses:1000,buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:"Bronze Sword"}}}},{maxUses:1000,buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:"Runite Longsword"}}}}]}}
1
05/30/2015 5:12 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
It's Profession btw, not Proffession. Also you forgot to put in "maxUses:" for each recipe
1
05/30/2015 6:39 pm
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Thanks for correcting my typo, weird the command block didn't react on that.
And is the maxUses neccesary? Do I have to add that or is it optional?
1
05/30/2015 3:45 pm
Level 4 : Apprentice Miner
Dinglydell
Dinglydell's Avatar
One of your buy/sells was within the previous trade's sell. You were missing a }
This should do it:
/summon Villager -150 5 -843 {Proffession:3,Career:2,CareerLevel:6,Offers:{Recipes:[{buy:{id:emerald,Count:15},sell:{id:iron_sword,Count:1}},{buy:{id:emerald,Count:7},sell:{id:stone_sword,tag:{display:{Name:Dagger,Count:1}}},{buy:{id:emerald,Count:3},sell:{id:wooden_sword,Count:1,tag:{display:{Name:Bronze Sword}},{buy:{id:emerald,Count:30},sell:{id:diamond_sword,Count:1,tag:{display:{Name:Runite Longsword}}}}}}}}]}}

If not, the display names may need to be in quotes, and possibly the ids.
As far as I'm away, ids work just fine without the minecraft: prefix.
1
05/30/2015 6:37 pm
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
Nothing made a diffrence, I even tried adding quotes on the display names and ids aswell.
Don't really see where I missed a } either. I see you added another } to the end of the stone sword/dagger sell, but it dosen't make sense to me. :/
Thanks for trying to help anyway
1
05/28/2015 7:44 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Not quite sure about how villager trades work, I'm just going to assume for now that you did the formatting for that stuff correctly.

Some things to try: Data tags like to have block and items ids with the prefix, i.e. 'diamond_sword' becomes 'minecraft:diamond_sword'. Also, for the named items, try putting the name inside quote marks (" ") to identify them as a string.
1
05/29/2015 2:20 pm
Level 11 : Journeyman Explorer
TheNorwayPlayer
TheNorwayPlayer's Avatar
I already tried the (" ") thing, which resulted in the same message.
I also just tried the minecraft: thing you suggested and it still made no diffrence.
Thanks for trying to help me though.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome