Cant change specific lore line when I use a variable as number for lore line

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

Dractical

Member
Dec 30, 2019
14
0
1
Skript Version (do not put latest):2.5-alpha6-MH
Skript Author:
Bensku
Minecraft Version: 1.16


CODE:
Code:
command /upgrade:
   permission: tester
   trigger:
       set {_0} to lore of player's tool
       set {_1::*} to split {_0} at "||"
       set {_0} to size of {_1::*}
       if line {_0} is "&f&lCOMMON":
           set line {_0} of lore of player's tool to "&a&l&kA &r&a&lUNCOMMON &r&a&l&kA"
       if line {_0} is "&a&lUNCOMMON":
           set line {_0} of lore of player's tool to "&9&l&kA &r&9&lRARE &r&9&l&kA"
       if line {_0} is "&9&lRARE":
           set line {_0} of lore of player's tool to "&5&l&kA &r&5&lEPIC &r&5&l&kA"
       if line {_0} is "&5&lEPIC":
           set line {_0} of lore of player's tool to "&6&l&kA &r&6&lLEGENDARY &r&6&l&kA"
       if line {_0} is "&6&lLEGENDARY":
           set line {_0} of lore of player's tool to "&d&l&kA &r&d&lMYTHIC &r&d&l&kA"

No errors, doesn't change lore. Please help!
[doublepost=1596674699,1596674258][/doublepost]Yes, the variable is a number
 
Last edited:
Hey Dractical,

Please format your code in code blocks. This helps people who would like to help you read your code and makes the overall proccess quicker and easier.

The format looks like:

Code:
Example

You put your code in it by putting [ CODE] at the start and [ /CODE] at the end of your code without the spaces.

Hopefully this helps you make your code more readable!
 
Hey Dractical,

Please format your code in code blocks. This helps people who would like to help you read your code and makes the overall proccess quicker and easier.

The format looks like:

Code:
Example

You put your code in it by putting [ CODE] at the start and [ /CODE] at the end of your code without the spaces.

Hopefully this helps you make your code more readable!
ok fixed
yw
[doublepost=1596832177,1596829023][/doublepost]bump
 
Status
Not open for further replies.