Discord Thread Skript Error

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

Swirly

Member
Aug 5, 2018
16
0
1
24
So I am trying to make a skript where you can get Broken legs If a player falls or takes a certain amount of damage from a fall to cause a chat notificaion to pop up on their end saying "You'd feel a sharp pain in your leg as it snapped" and apply a slowness effect for about 10s and maybe nausea effect for 5s but I keep getting this error

code_language.skript:
on damage:
    if cause is falling and event-entity is a player:
        set {_damage} to event-damage
        if {_damage} is greater than or equal to 3: # Adjust the value as needed
            send "&cYou'd feel a sharp pain in your leg as it snapped" to event-entity
            apply slowness of level 1 to event-entity for 10 seconds
            apply nausea of level 1 to event-entity for 5 seconds

Posted by: csulaaa from the skUnity Discord. View the thread on skUnity Discord here
 
You could probably fix this by seperating the two
code_language.skript:
on damage:
    if cause is falling:
        if victim is a player:
            set {_damage} to event-damage
            if {_damage} is greater than or equal to 3:
                send "&cYou'd feel a sharp pain in your leg as it snapped" to event-entity
                apply slowness of level 1 to event-entity for 10 seconds
                apply nausea of level 1 to event-entity for 5 seconds

Posted by: abbystial from the skUnity Discord.
 
Status
Not open for further replies.