Checking inventory for player head not working.

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

Rosathorn

Member
Oct 29, 2019
13
0
1
18
https://pastebin.com/yJteyiQL is my code.
Error is that: "Player head item named "Fox Egg" is not a types.barflag"

Skript Version (do not put latest): Skript 2.4
Skript Author: Bensku
Minecraft Version: 1.14.4
Addons: Skrayfall,SkQuery,Skellett,skript-votifier-hook,vixio,TuSKe
 
This is not possible at the moment as skript = trash

Look at this.
upload_2020-1-4_1-51-54.png


Someone tell me why this appears.
upload_2020-1-4_1-52-19.png

I doubt anyone can give me a reason.
@ShaneBee pls fix :emoji_grinning:
 
@ShaneBee so there's no way to fix it?

ive tried many things and it seems like i cant make script try to see if the inventory of the arg-2 contains a skull of a registered minecraft user that also is named and has a lore, yet alone the first part. Something like "set {_i} to skull of "gam3rqc" with name "&eFox egg" and lore "Incubate this in an incubator" "
 
Well, the error is in your code:
code_language.skript:
if arg-2's inventory contains a player head named "&eFox Egg" and lore "Incubate this in an incubator":
The syntax is:
code_language.skript:
%item type% with [(a|the)] lore %texts%
as you can see its "with lore" not "and lore"
 
Well here you go. I didn't actually test it but at least no errors were printed. If I actually fixed it, I'm gonna ask you to compare your code with mine and tell the differences, and most importantly understand what you did wrong.
Code:
command /pets [<text>] [<player>]:
    permission: admin
    trigger:
        if arg-1 is "incubate":
            if arg-2 is set:
                if arg-2 has player head named "&eFox Egg" with lore "Incubate this in an incubator":
                    wait 1 tick
                    remove 1 of player head with name "&eFox Egg" with lore "Incubate this in an incubator" from arg-2
                    wait 1 tick
                    give skull of "gam3rqc" parsed as offlineplayer named "&eFox" with lore "Rare||Eats meat" to arg-2
 
Well, the error is in your code:
code_language.skript:
if arg-2's inventory contains a player head named "&eFox Egg" and lore "Incubate this in an incubator":
The syntax is:
code_language.skript:
%item type% with [(a|the)] lore %texts%
as you can see its "with lore" not "and lore"

Did they change the syntax in 2.4?

eh who cares things change all the time people have to get used to it
 
Status
Not open for further replies.