#How can i split something by quotes?

1 messages · Page 1 of 1 (latest)

balmy junco
#

on right click on a player head:
    if {cantgrave::*} contains clicked block:
        set {_so} to compound tag "SkullOwner" of nbt of clicked block
        set {_args::*} to {_so} split by """
        send {_args::*}

dense linden
#

double the quotes
though there shouldn't be any quotes in {_so} to start with

balmy junco
dense linden
balmy junco
#

If i double the quotes, it will not splity by a quote

dense linden
#

yes it will

#

but also

though there shouldn't be any quotes in {_so} to start with

balmy junco
#

That's the nbt of a placed player head

i want to get only the KinaMary

dense linden
#

so get the name tag

#

a compound tag is not a string, you can't split it

#

you should use the proper method of getting subtags from it

balmy junco
#

can u send me a link or a tutorial?

dense linden
#

tag "SkullOwner;Name"

#

it's all on the skbee wiki

balmy junco
#

Ooh, i'll try

#
on right click on a player head:
    if {cantgrave::*} contains clicked block:
        set {_so} to compound tag "SkullOwner;Name" of nbt of clicked block
        send {_so}

No errors, but didnt workd

dense linden
#

it's not a compound tag

#

it's a string tag