I am creating a program to replace mobs with armoured mobs (Using a Command Computer). All data handling and such is done elsewhere in the code, and I have confirmed that it works and carries the correct information. However, the line I am using to actually spawn the new mob throws an unexpected error:
")" expected
I am confused about this. I see no syntax being broken. I would appreciate if somebody could explain what is going on here and why it is occurring
commands.exec( "execute @e[type="..tag["Name"]..",tag=!enhanced] ~ ~ ~ /summon "..tag["Name"].." ~ ~ ~ { ArmorItems:[ {Count:"..tag["Data"][1]["Count"]..",id:"..tag["Data"][1]["Item"].."}, {Count:"..tag["Data"][2]["Count"]..",id:"..tag["Data"][2]["Item"].."}, {Count:"..tag["Data"][3]["Count"]..",id:"..tag["Data"][3]["Item"].."}, {Count:"..tag["Data"][4]["Count"]..",id:"..tag["Data"][4]["Item"].."}, {} ], ArmorDropChances:["..tag["Data"][1]["Chance"].."F,"..tag["Data"][2]["Chance"].."F,"..tag["Data"][3]["Chance"].."F,"..tag["Data"][4]["Chance"].."F], Tags:[\"enhanced\"]}")
I put it in a pastebin for if you needed a single line
Thanks in advance
Edit: Forgot to add an F
Edit2: Here is the function associated with this line
Edited by Hydrotronics, 12 May 2019 - 08:35 AM.