how do i check if a block is at a location set in a variable

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

zonf

Member
Mar 23, 2021
2
0
1
21
Code:
on break:
    if event-block is at {%player%.spawnblock}:
        cancel event

Errors:
Line 9: Can't compare a block with 'at {%player%.spawnblock}' (script.sk, line 9: if event-block is at {%player%.spawnblock}'s location:')
 
Last edited:
i want to do it with a variable, and 2nd it doesn't work
Code:
on rightclick on cobblestone:
    if player is holding stick named "&bCobblestone generator activator":
        set {%location%.cobblestonegen} to clicked block's location

on rightclick on cobblestone:
    if clicked block is at {%location%.cobblestonegen}:
        set {a} to 3
[doublepost=1616766995,1616766703][/doublepost]oh wait i can just do this nvm
Code:
on rightclick on cobblestone:
    if player is holding stick named "&bCobblestone generator activator":
        set {%location%.cobblestonegen} to clicked block's location
        set {%location%cobblestonegen} to event-block

on rightclick on cobblestone:
    if event-block is {%location%cobblestonegen}:
        set {a} to 3
 
Status
Not open for further replies.