How do I make this skript work

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

fds

Member
Jan 8, 2020
4
0
1
22
on break of iron ore:
player is holding a wooden pickaxe
if level of efficiency of player's tool is greater than or equal to 10
give player iron ingot
if else:
send "&4§lUpgrade your pickaxe with /merchant to mine this" to player

Im trying to make it so a player needs efficiency level 10 to mine iron can anyone help?
 
Use "else:" instead of "if else:" since that wouldn't work, and make sure to cancel event before or after you sent the "upgrade your pickaxe ..." message otherwise player's can still break the block.
 
2021-08-26_22.52.13.png
Im getting these errors
[doublepost=1630033103,1630032822][/doublepost]
2021-08-26_22.57.23.png
Got it down to one error :emoji_grinning:
 

Attachments

  • 2021-08-26_22.52.13.png
    2021-08-26_22.52.13.png
    1 MB · Views: 84
Code:
on break of iron ore:
    player is holding a wooden pickaxe
    if level of efficiency of player's tool is greater than or equal to 10:
    give player iron ingot
else:
    cancel event
    send "&4§lUpgrade your pickaxe with /merchant to mine this" to player
 
Code:
on break of iron ore:
    player is holding a wooden pickaxe:
        if level of efficiency of player's tool is greater than or equal to 10:
            give iron ingot to player
            stop
    cancel event
    send "&4§lUpgrade your pickaxe with /merchant to mine this" to player
 
Status
Not open for further replies.