1 Error in skript

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

FARRscs

Member
Nov 5, 2024
2
0
1
hey, so i was codng an levelup command for my server here's the code

Code:
variables:

    {levels::1} = "survivor"

    {levels::2} = "warrior"

    {levels::3} = "champion"

    {levels::4} = "guardian"

    {levels::5} = "elite"

    {levels::6} = "master"

    {levels::7} = "hero"

    {levels::8} = "legend"

    {levels::9} = "myth"

    {levels::10} = "demigod"

    {levels::11} = "titan"

    {levels::12} = "sage"

    {levels::13} = "warlord"

    {levels::14} = "emperor"

    {levels::15} = "immortal"

    {levels::16} = "divine"

    {levels::17} = "godlike"

    {levels::18} = "supreme"

    {levels::19} = "eternal"

    {levels::20} = "omnipotent"



command /levelup:

    trigger:

        set {_xp_needed} to 50

        while player's experience level >= {_xp_needed}:

            set {_remaining_levels} to player's experience level - {_xp_needed}

            set {_current_level} to size of {levels::*}

            if {_current_level} > 20:

                break

            else:

                set player’s chat format to "&8[&7%{levels::%{_current_level}}%&8] %player%: %message%"

                send "You've leveled up to %{levels::%{_current_level}}%! Keep going!" to player

                add 1 to {_current_level}

                add 50 to {_xp_needed}

                set player's experience level to {_remaining_levels}


but the thing it shows 1 error, can anyone please help me??
 
Last edited:
hey, so i was codng an levelup command for my server here's the code

variables:
{levels::1} = "survivor"
{levels::2} = "warrior"
{levels::3} = "champion"
{levels::4} = "guardian"
{levels::5} = "elite"
{levels::6} = "master"
{levels::7} = "hero"
{levels::8} = "legend"
{levels::9} = "myth"
{levels::10} = "demigod"
{levels::11} = "titan"
{levels::12} = "sage"
{levels::13} = "warlord"
{levels::14} = "emperor"
{levels::15} = "immortal"
{levels::16} = "divine"
{levels::17} = "godlike"
{levels::18} = "supreme"
{levels::19} = "eternal"
{levels::20} = "omnipotent"

command /levelup:
trigger:
set {_xp_needed} to 50
while player's experience level >= {_xp_needed}:
set {_remaining_levels} to player's experience level - {_xp_needed}
set {_current_level} to size of {levels::*}
if {_current_level} > 20:
break
else:
set player’s chat format to "&8[&7%{levels::%{_current_level}}%&8] %player%: %message%"
send "You've leveled up to %{levels::%{_current_level}}%! Keep going!" to player
add 1 to {_current_level}
add 50 to {_xp_needed}
set player's experience level to {_remaining_levels}


but the thing it shows 1 error, can anyone please help me??

Please put your code inside a code "bracket"
Also you can include your error message too.
 
Last edited:
  • Like
Reactions: FARRscs
you should have specified what you meant by that; without the proper context that could mean anything

Thanks :emoji_slight_smile:


thank you
and ui'll make sure to follow that

Please use the website function where you can insert code, makes the post alot more readable thanks :emoji_slight_smile:
Also what errors do you get?

1730928742371.png