Solved Custom XP Skript not working

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

Nikel

New Member
Dec 2, 2018
9
3
3
28
Im trying to make XP skript not using minecraft lvl system.

there is no error in skript.
i guess "if entity is "Zombie"" is wrong but i dont really know what to fix..

LVLUP.PNG
 
Can you please format the code using the plus button above the text field? Thank you!
 
Also I believe this could be it
code_language.skript:
on death:
    if victim is a zombie:
        add 1 to {%attacker%.xp}
        message "{@nikel}XP: [%{%attacker%.xp}% / %{%attacker%.lvlxp}% ]" to attacker
    if {%attacker%.xp} >= {%attacker%.lvlxp}:
        message "{@nikel} Level Up!" to attacker
        add 20 to {%attacker%.lvlxp}
        set {%attacker%.xp} to 0
[doublepost=1544576718,1544576668][/doublepost]
Sry, this is my first time posing about my skript... i dont know how to do it :emoji_frowning:
but i tried to post picture of my code
It's all good <3
 
Also I believe this could be it
code_language.skript:
on death:
    if victim is a zombie:
        add 1 to {%attacker%.xp}
        message "{@nikel}XP: [%{%attacker%.xp}% / %{%attacker%.lvlxp}% ]" to attacker
    if {%attacker%.xp} >= {%attacker%.lvlxp}:
        message "{@nikel} Level Up!" to attacker
        add 20 to {%attacker%.lvlxp}
        set {%attacker%.xp} to 0
man,,, how did u do that?
 
In the bar above the text field, ie. B I U (water drop) T! A etc. there is a little + sign in a square. Click on it, click Code, select Skript, and paste your code into the text pop-up.
 
In the bar above the text field, ie. B I U (water drop) T! A etc. there is a little + sign in a square. Click on it, click Code, select Skript, and paste your code into the text pop-up.
thanks~! and what's wrong with my code..?
 
You put
code_language.skript:
"zombie"
instead of
code_language.skript:
a zombie
. The difference is one is a text, and one is parsed by Skript as an entity-type. Also, you put
code_language.skript:
entity is a zombie
when I believe it should be
code_language.skript:
victim is a zombie
, however I'm not entirely sure. If it makes you feel better I made both of these errors today and that's why I could solve it so quickly ;D
 
You put
code_language.skript:
"zombie"
instead of
code_language.skript:
a zombie
. The difference is one is a text, and one is parsed by Skript as an entity-type. Also, you put
code_language.skript:
entity is a zombie
when I believe it should be
code_language.skript:
victim is a zombie
, however I'm not entirely sure. If it makes you feel better I made both of these errors today and that's why I could solve it so quickly ;D
OMG victim is a zombie was right :emoji_grinning: thanks for help!
 
Status
Not open for further replies.