Jump to content

Using a Variable as a line to change in lore


agagagagagagagagag

Recommended Posts

ok so I have this:

 

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"

No errors, nothing. Just doesn't change the line of lore.

Link to comment
Share on other sites

Heya!

Your "if" statement is incorrect. What you're trying to do is check for a line on a sign. I'd presume you're checking for a lore. 😉

On 8/7/2020 at 4:45 AM, agagagagagagagagag said:

if line {_0} is "&f&lCOMMON":

Check out this post from SkriptHub: https://skripthub.net/docs/?id=978

Try this code:

if line {_0} of lore of player's tool is "&f&lCOMMON":

Always feel free to contact me or continue this thread if you need more help.

❤️😄 

 

image.png.e46e91961f1d6d4604a6e5f3dcb5a2bd.png

unknown.pngunknown.png

Link to comment
Share on other sites

1 hour ago, AWorthySon said:

Heya!

Your "if" statement is incorrect. What you're trying to do is check for a line on a sign. I'd presume you're checking for a lore. 😉

Check out this post from SkriptHub: https://skripthub.net/docs/?id=978

Try this code:


if line {_0} of lore of player's tool is "&f&lCOMMON":

Always feel free to contact me or continue this thread if you need more help.

❤️😄 

i've seen those 2 pictures on google so i can copy em if i wanted lol

tyty.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...