Solved NBT to a Entity

  • 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 community!

    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.

RaulH22

New Member
Aug 15, 2018
6
1
0
Hi, anyone know how to add a nbt to a entity??

Im trying this:

command /mount:
trigger:
spawn horse at player
set nbt of spawned horse to "{Variant:259, SaddleItem:{id:saddle, Count:1}, Age:0}"
make player ride spawned horse
set name of spawned horse to "%player%.montary Vaca Louca"


But...
[12:27:20 ERROR]: ':259, SaddleItem:{id:saddle, Count:1}, Age:0}"' is not a valid item data (mountary.sk, line 6: set nbt of spawned horse to "{Variant:259, SaddleItem:{id:saddle, Count:1}, Age:0}"')
 
code_language.skript:
add "{Variant:259,SaddleItem:{id:saddle,Count:1},Age:0}" to last spawned entity's nbt
Please note that i also removed the spaces, which might or might not make a difference.
 
Now its saying:

[12:45:41 ERROR]: Can't understand this condition/effect: add "{Variant:259,SaddleItem:{id:saddle,Count:1},Age:0}" to last spawned entity's nbt (mountary.sk, line 6: add "{Variant:259,SaddleItem:{id:saddle,Count:1},Age:0}" to last spawned entity's nbt')
 
Hm, that's correct syntax. Have you made sure that SkStuff is loaded and functional?
 
Status
Not open for further replies.