Skript not reading 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.
Oct 3, 2017
19
2
3
26
Skript Version: Skript 2.4.1
Skript Author: Bensku
Minecraft Version: 1.15

Full Code:
Code:
on projectile hit:
    if projectile is an arrow:
        if shooter is a player:
            if {perk.explosive.%shooter%} is true:
                wait 3 seconds
                create an explosion of force 3.5 at location of projectile
                delete projectile

I don't understand why the script isn't reading "if {perk.explosive.%shooter%} is true:" as I broke it down piece by piece to see what the error was followed by this code that works. The projectile is shot, hits anything, and doesn't explode.

Code:
command /pk [<text>]:
    trigger:
        if arg-1 is "clear":
            [code]
        if arg-1 is "explosive":
            if {perk.slot.%player%} is true:
                send "&cOnly one perk can be active at a time!" to the player
                stop
            if {perk.slot.%player%} is false:
                if player has permission "perk.perk.earrow":
                    send "&aExplosive Arrows perk activated!" to the player
                    set {perk.slot.%player%} to true
                    set {perk.explosive.%player%} to true
                    set {perkslot.slot.%player%} to bow named "&bExplosive Arrow"

I did a smaller scale test of this code and it works fine. I've been scratching my head since there's no console errors or skript errors.
Code:
command /test:
    trigger:
        if {perk.explosive.%player%} is true:
            send "This works" to the player



Have you tried searching the docs? Yes
Have you tried searching the forums? Scrolling through I haven't seen it
What other methods have you tried to fix it? Tried setting different "if" statements and taking out lines. Adding a 'Send "This should work" to the shooter' line to see what line it's not picking up. Worldguard is installed and I tried setting the region to creeperexplosion allow, otherexplosion allow, and tnt allow
 
Status
Not open for further replies.