Solved Help with "if {%player%_blod} is greater than 3:"

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

Cowio

New Member
Aug 13, 2017
7
0
0
22
Skript Version: Latest Version
Skript Author: Me
Minecraft Version: Server 1.8.9

---
Full Code:
Note: If the code is too large, feel free to use a pasting website (Pastebin or hastebin)
Note: If a variable is being set in another script, but not shown, please explain how they are being set


code_language.skript:
Variables:
    {%player%_blod} = 0


command /resetblod <player>:
    trigger:
        set {%arg-1%_blod} to 0
        send "&cBlodHeks &8: &7Du har sat %arg-1%'s &cblod &7til 0."


command /blod:
    trigger:
        send "&cBlodHeks &8: &7Du har &f%{%player%_blod}% &cblod&7."


command /setblod <player> [<text>]:
    trigger:
        set {%arg-1%_blod} to arg-2
        send "&cBlodHeks &8: &7Du har sat %arg-1%'s &cblod &7til &f%arg-2%&7."

   









command /Blodheks:
    trigger:
        open chest with 3 rows named "&c&lBlod Heks" to player
        wait 1 tick

        format slot 4 of player with book named "&eINFO" with lore "&rDu har disse buffs, indtil du dør!" to be unstealable
        format slot 11 of player with sugar named "&rSpeed" with lore "||||&c4 Blod" to close then run [make player execute command "/speedblod"]
        format slot 13 of player with nether wart item named "&rStrength" with lore "||||&c6 Blod" to close then run [make player execute command "/strengthblod"]
        format slot 15 of player with golden apple:0 named "&rRegen" with lore "||||&c4 Blod" to close then run [make player execute command "/regenblod"]
        format slot 22 of player with redstone named "&cBlod &7: &f%{%player%_blod}%" to be unstealable



command /speedblod:
    trigger:
        if {%player%_blod} is greater than 3:
            remove 4 from {%player%_blod}
        else:
            send "&cBlodHeks &8: &7Du har ikke nok blod."

Errors on Reload:

code_language.skript:
No ERROR

Console Errors: (if applicable)

code_language.skript:
No ERROR

Other Useful Info:

Addons using (including versions):
ADDONS HERE

Troubleshooting:

Have you tried searching the docs? Yes/No
Have you tried searching the forums? Yes/No
What other methods have you tried to fix it?
[doublepost=1512902154,1512902027][/doublepost]When i use the /speedblod
It just ignores the "if {%player%_blod} is greater than 3:"
and jumps straight over to the "else:"
 
Lets start of with this, you dont want your formula starting with the player do it something like this:
It doesnt work because the formula is wrong do it like the example below.
Code:
{_blod.%player%}
 
Lets start of with this, you dont want your formula starting with the player do it something like this:
It doesnt work because the formula is wrong do it like the example below.
Code:
{_blod.%player%}

So i tried replacing all my variables with the "{_blod.%player%}" and now i can't set my /setblod <player> [<text>]: anymore.
I'm so confused because it worked fine in a other skript that i created. :/
 
The set blod thing is the text a number? If it is change to this: [<integer>] or <integer>
 
Hmmm wierd i dont have any answers either..

Okay, well i thank you for your help. :emoji_slight_smile:
[doublepost=1512924698,1512905146][/doublepost]I fixed it by deleting the skript and doing it all over.

I don't know what happend but it's working so if you get the same problem just delete the skript and do it all over.

Thanks for your time.
- Cowio
 
Status
Not open for further replies.