Solved Autoblock

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

Riet

Member
Dec 11, 2019
11
1
0
21
Hello fellow skripters!

I tried to make a skript where it automatically turns ingots into blocks
This is what I have:

Code:
on block break:
    if event-block is lapis ore:
        set {lapis.%player%} to amount of lapis in player's inventory
        if {lapis.%player%} is greater than or equal to 10:
            remove 9 lapis from player's inventory
            give player 1 lapis block
        if {lapis.%player%} is greater than or equal to 19:
            remove 18 lapis from player's inventory
            give player 2 lapis block
        if {lapis.%player%} is greater than or equal to 28:
            remove 27 lapis from player's inventory
            give player 3 lapis block
        if {lapis.%player%} is greater than or equal to 37:
            remove 36 lapis from player's inventory
            give player 4 lapis block
        if {lapis.%player%} is greater than or equal to 46:
            remove 45 lapis from player's inventory
            give player 5 lapis block

It doesn't give me any errors, it just doesn't work.
[doublepost=1584130179,1584127161][/doublepost]
Hello fellow skripters!

I tried to make a skript where it automatically turns ingots into blocks
This is what I have:

Code:
on block break:
    if event-block is lapis ore:
        set {lapis.%player%} to amount of lapis in player's inventory
        if {lapis.%player%} is greater than or equal to 10:
            remove 9 lapis from player's inventory
            give player 1 lapis block
        if {lapis.%player%} is greater than or equal to 19:
            remove 18 lapis from player's inventory
            give player 2 lapis block
        if {lapis.%player%} is greater than or equal to 28:
            remove 27 lapis from player's inventory
            give player 3 lapis block
        if {lapis.%player%} is greater than or equal to 37:
            remove 36 lapis from player's inventory
            give player 4 lapis block
        if {lapis.%player%} is greater than or equal to 46:
            remove 45 lapis from player's inventory
            give player 5 lapis block

It doesn't give me any errors, it just doesn't work.



I have figured out what i did wrong!
 
Status
Not open for further replies.