Solved Can't understand condition/effect

  • 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
25
To start off, I am not too advanced in doing a lot of big skripting but I've been trying to practice them. I've been trying to make a perk skript with this code:

code_language.skript:
on damage of a player:
    if attacker is a player:
        if {ragemeter:%attacker%} is 1
            if {rage:%attacker%} is 1:
                apply strength 3 to the attacker for 3 seconds
                set {ragemeter:%attacker%} to 0
                wait 5 seconds
                set {ragemeter:%attacker%} to 1
        if {ragemeter:%attacker%} is 0
        stop

I tried to base it off of a previous one I made which worked:
code_language.skript:
on damage of a player:
    if attacker is a player:
        if {poison:%attacker%} is 1:
            apply poison 1 to the victim for 10 seconds
However, I get indentation errors and the skript cannot understand the condition/effect {ragemeter:%attacker%}


I have Skript, SKQuery, and skRayFall
 
  • Like
Reactions: Zetor
code_language.skript:
on damage of a player:
    if attacker is a player:
        if {ragemeter:%attacker%} is 1
            if {rage:%attacker%} is 1:
                apply strength 3 to the attacker for 3 seconds
                set {ragemeter:%attacker%} to 0
                wait 5 seconds
                set {ragemeter:%attacker%} to 1
        #this part is useless
        if {ragemeter:%attacker%} is 0
        stop
#if you wanted to indent it right it should be like this
#        if {ragemeter:%attacker%} is 0
#                stop
 
code_language.skript:
on damage of a player:
    if attacker is a player:
        if {ragemeter:%attacker%} is 1
            if {rage:%attacker%} is 1:
                apply strength 3 to the attacker for 3 seconds
                set {ragemeter:%attacker%} to 0
                wait 5 seconds
                set {ragemeter:%attacker%} to 1
        #this part is useless
        if {ragemeter:%attacker%} is 0
        stop
#if you wanted to indent it right it should be like this
#        if {ragemeter:%attacker%} is 0
#                stop
The indentation wasn't the error I wanted to fix, it was the skript not understanding the "{rage:%attacker%} is 1:"
 
code_language.skript:
on damage of a player:
    if attacker is a player:
        if {ragemeter:%attacker%} is 1:
            if {rage:%attacker%} is 1:
                apply strength 3 to the attacker for 3 seconds
                set {ragemeter:%attacker%} to 0
                wait 5 seconds
                set {ragemeter:%attacker%} to 1
you forgot to add : after some conditions, this should work.
 
Status
Not open for further replies.