how to parse an item with an enchantment in one single argument

  • 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.

Dressi

Member
Aug 6, 2017
2
0
1
My problem is that each time "player's tool" is an item with an enchantment my command won't work and I believe it is because it prints %player's tool% like this "diamond_sword of Efficiency 5 " but because there is spaces between sword and of and between of and efficiency and so on, it makes the command think that its more than one argument and therefore my command won't work as intended. so my question is, are there any way I can fix that or maybe go around it some other way? :emoji_slight_smile:

some of my code is right here:
Code:
on chat:
    if {vagtkiste.tilføj.værdi.%player%} is true:
        cancel event
        set {_message} to message parsed as integer
        if {_message} is a number:
            execute player command "/vagtkiste items tilføj item %player's tool% %{_message}%"
        else if message is "!cancel":
 
Status
Not open for further replies.