Solved Cannot add Blockdata

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

mmm

Member
Apr 24, 2017
2
0
0
27
code_language.skript:
command /test:
    trigger:
        loop all entities:
            if name of loop-entity is "testRoom":
                set {_armorstand} to location of loop-entity
                subtract 1 from y-coordinate of {_armorstand}
                set {_structureBlock} to {_armorstand}
                broadcast "%{_structureBlock}%"
                set block at {_structureBlock} to structure_block
                add "{rotation:"CLOCKWISE", name:"testRoom", mode:"LOAD", posY:0}" to NBT of {_structureBlock}
code_language.skript:
[21:33:13 ERROR]: ':"CLOCKWISE", name:"testRoom", mode:"LOAD", posY:0}"' is not a valid item data (a.sk, line 46: add "{rotation:"CLOCKWISE", name:"testRoom", mode:"LOAD", posY:0}" to NBT of {_structureBlock}')


Can't add NBT tags to structure blocks... Not sure if my code is wrong or its skript. Using skStuff to add NBT tags.

Also for some reason this wont work either. I have to go from one variable to another variable or the variable shows up as <none>.

code_language.skript:
command /test:
    trigger:
        loop all entities:
            if name of loop-entity is "test":
                set {_structureBlock} to location of loop-entity
                subtract 1 from y-coordinate of {_structureBlock}
                set block at {_structureBlock} to structure_block
 
inside any String you need use double (") Example
code_language.skript:
  add "{rotation:""CLOCKWISE"", name:""testRoom"", mode:""LOAD"", posY:0}" to NBT of {_structureBlock}
 
  • Like
Reactions: mmm
Status
Not open for further replies.