Problem when trying to detect an iron door

  • 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 community!

    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.

alexy57100

Member
Jul 30, 2017
2
1
0
Hello,
First of all, I'am using MC 1.11.2 and last stable skript version.

Code:
        if arg 1 is "hack":
            if arg 2 is "door":
                if targeted block is bottom close iron door:
                    send "ok"
                else:
                    send "&cHum, no iron door"

So, the problem is:

Code:
[12:22:17 ERROR]: Can't compare a block with 'bottom close iron door' (WatchDogs.sk, line 91: if targeted block is bottom close iron door:')
[12:22:17 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (WatchDogs.sk, line 93: else:')
[12:22:17 INFO]: [Skript] Encountered 2 errors while reloading WatchDogs.sk!

I tried a lot of things but nothing work.

I just want to detect if the targeted block is an iron door and send a message to know if this is or not.
 
Hello,
First of all, I'am using MC 1.11.2 and last stable skript version.

Code:
        if arg 1 is "hack":
            if arg 2 is "door":
                if targeted block is bottom close iron door:
                    send "ok"
                else:
                    send "&cHum, no iron door"

So, the problem is:

Code:
[12:22:17 ERROR]: Can't compare a block with 'bottom close iron door' (WatchDogs.sk, line 91: if targeted block is bottom close iron door:')
[12:22:17 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (WatchDogs.sk, line 93: else:')
[12:22:17 INFO]: [Skript] Encountered 2 errors while reloading WatchDogs.sk!

I tried a lot of things but nothing work.

I just want to detect if the targeted block is an iron door and send a message to know if this is or not.
This is because some aliases are broken in Skript 2.3+ for Spigot 1.12.2 and below.

You can try something like
code_language.skript:
if "%type of target block%" = "IRON_DOOR"
if that doesnt work, debug by sending the type of target block to see what it is
 
  • Like
Reactions: alexy57100
Status
Not open for further replies.