#It's not getting the safezones properly. I just need syntax correction.

1 messages · Page 1 of 1 (latest)

civic kestrel
north vector
#

what syntax? What like is your error? have you looked at the docs?

civic kestrel
# north vector what syntax? What like is your error? have you looked at the docs?

[18:34:15 INFO]: [Skript] Line 14: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}: [18:34:15 INFO]: [18:34:15 INFO]: [Skript] Line 22: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}: [18:34:15 INFO]: [18:34:15 INFO]: [Skript] Line 32: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}: [18:34:15 INFO]: [18:34:15 INFO]: [Skript] Line 42: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}: [18:34:15 INFO]: [18:34:15 INFO]: [Skript] Line 50: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}: [18:34:15 INFO]: [18:34:15 INFO]: [Skript] Line 61: (safezones.sk) [18:34:15 INFO]: undefined option {@safezones::*} [18:34:15 INFO]: Line: loop {@safezones::*}:

north vector
#

well yeah thats made up syntax

#

also i would not use an option for that

#

just add elemets to the list on load

civic kestrel
#

How do I add custom nbt data to items?

set {_compass} to compass with custom nbt of "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"

north vector
#

have you looked at the skbee wiki?

civic kestrel
#

I have looked into the skript docs for it, and tried many kind of combinations of syntaxes for setting custom nbt data to items, but all have been coming out as "Can't understand this structure"

north vector
#

well its not a structure... you need to put in inside an event or something

civic kestrel
#
    permission: police.use
    trigger:
        set {_x} to arg-1
        set {_z} to arg-2
        set {_y} to 100
        set {_world} to world of player
        set {_loc2} to location at {_x}, {_y}, {_z} in {_world}

        set {_compassFound} to false
        loop all items in player's inventory:
            if loop-value is a compass named "&cCrime Tracker":
                set {_compass} to loop-value
                set {_compassFound} to true
                set string tag "minecraft:lodestone_tracker.target.pos" of custom nbt of {_compass} to "[I; %{_x}%, %{_y}%, %{_z}%]"
                exit loop

        if {_compassFound} is false:
            set {_compass} to compass named "&cCrime Tracker"
            give {_compass} to player
            set string tag "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}" of custom nbt to {_compass}```


[19:37:15 INFO]:     Can't understand this condition/effect: set string tag "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}" of custom nbt to {_compass}
[19:37:15 INFO]:     Line: set string tag "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}" of custom nbt to {_compass}
#

Okay.

#

It says "Can't understand this condition/effect".

civic kestrel
#

@north vectoralive

north vector
#

i am

#

dont ping me

#

also cant you set the compass target with skript

civic kestrel
civic kestrel
north vector
#

there's an expression is there not

civic kestrel
#

I've actually came across that, but I'd like to actually just know how to put nbt data like "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}" inside of an item like a compass.

north vector
#

with NBT from ..., no?

#

the skbee wiki should cover this

civic kestrel
north vector
#

Im telling you it should.

civic kestrel
#

Yeah, it should

north vector
#

you should look there before you ask here

civic kestrel
#

So, should I write it like this?
set string tag of custom nbt of {_compass} with nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"

north vector
#

but im 99% sure that will error anyways

civic kestrel
#

[22:16:57 INFO]: [Skript] Line 131: (law_build.sk)
[22:16:57 INFO]: '{_compass} with nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"' can't be added to a player because the former is neither an item type, an inventory nor an experience point
[22:16:57 INFO]: Line: give player {_compass} with nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"

but SkBee did not include that I need to add an item type or so

north vector
#

Why dont you broadcast the nbt of a normal one and compare

civic kestrel
#

broadcast??

#

wdym?

#

normal one? what's that?

#

if {_compassFound} is false:
set {_n} to nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"
set {_compass} to compass named "&cCrime Tracker" with nbt {_n}
give player {_compass}

[22:30:25 INFO]: Can't understand this expression: 'nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"'
[22:30:25 INFO]: Line: set {_n} to nbt from "components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"

"Can't understand this expression"

dusty arrow
#
  1. Give yourself a compass and put it in your main hand
  2. run !broadcast pretty nbt nbt compound of player's tool in chat (or put it in a command without the exclamation mark)

Alternatively, look at the Minecraft Wiki or use mcstacker.net
And while you're at it, actually look at the SkBee docs: https://www.github.com/ShaneBeee/SkBee/wiki

GitHub

SkBee is a Skript addon that aims to add more useful elements to Skript. - ShaneBeee/SkBee

dusty arrow
civic kestrel
#

I didn't forget. I just didn't know there was supposed to be brackets.

dusty arrow
#

looking at the examples showed it

#

but even still, components have their own methods (again, the SkBee wiki covers them)

civic kestrel
#

[22:37:46 INFO]: Can't understand this expression: 'nbt from "{components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}}"'
[22:37:46 INFO]: Line: set {_n} to nbt from "{components:{minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}}"

civic kestrel
#

I tried this:
set {_n} to nbt from "{components:{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}}"
I tried this:
set {_n} to nbt from "{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"
I tried this:
set {n} to nbt from "{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}"
I tried this:
set {_n} to compass with nbt from "{components:{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[I;%{_x}%,%{_y}%,%{_z}%]},tracked:false}}}"

nothing I found from SkBee is working.

civic kestrel
north vector
#

the.. broadcasts effect?

#

make skript send a message

civic kestrel
#

I cannot

civic kestrel
#

All errors say "Can't understand this expression"

civic kestrel