I need help with a generator.

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

oHeckGage

Active Member
Mar 24, 2020
110
6
18
22
So I wanted to make a generator and I got 18 errors for the gold one.. here is the code...:

Code:
on place:
    loop all blocks in a radius of 3 from event-block:
        if event-block is yellow terracotta:
            if {yterra.%loop-player%} > 0:
                if target block isn't yellow terracotta:
                    cancel event
                    send "&cUpgrade your current generator!"
            else if {yterra.%loop-player%} < 0:
                set {yterra.%loop-player%} to 1
                send "&6BoxFarms| &aYou placed down your generator!"
                set {_loc} to {_loc} of event-block
on right click:
    loop all blocks in a radius of 3 from event-block:
        if event-block is yellow terracotta:
            if player's tool is yellow terracotta:
                cancel event
                add 1 to {yterra.%loop-player%}
                send "&6BoxFarms| &aYou upgraded your generator!"
every 5 seconds in world "true":
    loop all players:
        if {yterra.%loop-player%} is 1:
            drop 1 gold at {_loc}
        if {yterra.%loop-player%} is 2:
            drop 2 gold at {_loc}
        if {yterra.%loop-player%} is 3:
            drop 3 gold at {_loc}
        if {yterra.%loop-player%} is 4:
            drop 4 gold at {_loc}
        if {yterra.%loop-player%} is 5:
            drop 5 gold at {_loc}
        if {yterra.%loop-player%} is 6:
            drop 6 gold at {_loc}
        if {yterra.%loop-player%} is 7:
            drop 7 gold at {_loc}
        if {yterra.%loop-player%} is 8:
            drop 8 gold at {_loc}
        if {yterra.%loop-player%} is 9:
            drop 9 gold at {_loc}
        if {yterra.%loop-player%} is 10:
            drop 10 gold at {_loc}
        if {yterra.%loop-player%} is 11:
            drop 11 gold at {_loc}
        if {yterra.%loop-player%} is 12:
            drop 12 gold at {_loc}
        if {yterra.%loop-player%} is 13:
            drop 13 gold at {_loc}
        if {yterra.%loop-player%} is 14:
            drop 14 gold at {_loc}
        if {yterra.%loop-player%} is 15:
            drop 15 gold at {_loc}
        if {yterra.%loop-player%} is 16:
            drop 16 gold at {_loc}
Any help please?
 
Status
Not open for further replies.