Solved How to fix this?

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

JustPancake

Member
Aug 15, 2020
4
0
1
17
Format rn:

on right click on Beacon:
cancel event
message "%event-location%"
set {Coord} to event-location
set {_Coordx} to x coord of event-location
set {_Coordy} to y coord of event-location
set {_Coordz} to z coord of event-location
set {_Coordx} to {_Coordx}-0.5
set {_Coordy} to {_Coordy}-0.5
set {_Coordz} to {_Coordz}-0.5
set {_location1} to location(({_Coordx}-16), {_Coordy}, ({_Coordz}-16), world "world")
set {_location2} to location(({_Coordx}+16), {_Coordy}, ({_Coordz}+16), world "world")
loop all blocks within {_location1} and {_location2}:
message "working"
if loop-block is not a air:
message "hi"
else:
message "4"


loop is not working, how do i fix it?

server version: 1.16.2

using addon : SKchoke, Skellett. SkInvName, SkQuery, skRayFall, SKUtilities
[doublepost=1597632047,1597565421][/doublepost]
Code:
on right click on Beacon:
    cancel event
    set {Coord} to event-location
    set {_Coordx} to x coord of event-location
    set {_Coordy} to y coord of event-location
    set {_Coordz} to z coord of event-location
    set {_Coordx} to {_Coordx}-0.5
    set {_Coordy} to {_Coordy}-0.5
    set {_Coordz} to {_Coordz}-0.5
    set {_location1} to location(({_Coordx}-16), {_Coordy}, ({_Coordz}-16), world "world")
    set {_location2} to location(({_Coordx}+16), ({_Coordy}+10), ({_Coordz}+16), world "world")
    set {R.%{%{Kingdom.%player%}%}%} to 0
    loop all blocks within {_location1} and {_location2}:
        if loop-block is air:
            add 1 to {R.%{%{Kingdom.%player%}%}%}

it works now XD
 
Status
Not open for further replies.