1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

On Death

Discussion in 'Skript' started by JackyMan, Nov 17, 2021.

Tags:
  1. JackyMan

    JackyMan Member

    Joined:
    Nov 7, 2021
    Messages:
    3
    Likes Received:
    0
    So I am using this code:

    on death of wither:
    broadcast ""
    broadcast "&c A &4&lWither&r&c was killed by %player! Nice!"
    broadcast ""
    on death of ender dragon:
    broadcast ""
    broadcast "&c The &4&lEnder Dragonr&r&c was killed by %player! Nice!"
    broadcast ""

    however when I reload it gives this error:
    [11:52:10 ERROR]: Invalid amount or placement of brackets. Please make sure that each opening bracket has a corresponding closing bracket. (core.sk, line 49: broadcast "&c A &4&lWither&r&c was killed by %player! Nice!"')
    [11:52:10 ERROR]: Invalid amount or placement of brackets. Please make sure that each opening bracket has a corresponding closing bracket. (core.sk, line 53: broadcast "&c The &4&lEnder Dragonr&r&c was killed by %player! Nice!"')

    Whats the problem?
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    Please format your code first
     
  3. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    Maybe try putting a space in the empty quotes.
     
  4. yea rite

    yea rite Active Member

    Joined:
    Jul 11, 2021
    Messages:
    60
    Likes Received:
    3
    The problem is, you cant use player in a death event, or a damage event
    Also you used only 1 percent (%player)

    This should work
    Code (Text):
    1.  
    2. on death of wither:
    3.     broadcast ""
    4.     broadcast "&c A &4&lWither&r&c was killed by %attacker%&c! Nice!"
    5.     broadcast ""
    6.  
    7. on death of ender dragon:
    8.     broadcast ""
    9.     broadcast "&c The &4&lEnder Dragonr&r&c was killed by %attacker%&c! Nice!"
    10.     broadcast ""
    11.  
     
  5. JackyMan

    JackyMan Member

    Joined:
    Nov 7, 2021
    Messages:
    3
    Likes Received:
    0
    thanks worked <3!
     

Share This Page

Loading...