#Bounds Detection Not Correctly Working

1 messages · Page 1 of 1 (latest)

lime swallow
#

Hey! I have this code, but the problem is that it doesn't seem to find the block in the bound about 2/3rds of the time. Does anyone know how to fix this please?

    set {_block} to block data of event-block
    if world of event-block is "Flat":
        add 1 to {attempt}
        if location of event-block is not within bound with id "MineArea1" or "MineArea2":
            if player does not have permission "bounds.modify":
                cancel event
                send "&cYou cannot break blocks outside the mines!" to player
                stop
            else:
                send actionbar "You have permission!"
        else:
            cancel drops
            wait "%1/2% seconds" parsed as timespan
            add 1 to {works}
            send "Block: %{_block}%" to player
            set event-block to {_block}
        broadcast "%{works}%/%{attempt}%"```
tepid sail
#

"wait "%1/2% seconds" parsed as timespan" -> wait 10 ticks
-# (Heck, wait 0.5 seconds should work too)

lime swallow
#

I know but thank you though, and that isn't the problen though, the problem is with line 5 (I think) which is if location of event-block is not within bound with id "MineArea1" or "MineArea2":

tepid sail
#

try using an if all:

lime swallow
#

Okay, do you mean with the first 2 ifs in this skript? If so, I just tried it but I think it still has the same type of error.

#

It does seem to be a little bit better (Unless I am just a little luckier now), but it still doesn't do it all the time.

tepid sail
#

for the bounds

lime swallow
#

oh im a dumbo thank you I will try that!