Jump to content

loop lore of an item error


FlapKakker

Recommended Posts

Hi!

I have been skripting my own custom enchants skript in the last couple of weeks but took a break the last week. Everything was working fine before this week. When i launched my server, the custom enchants skript was starting to throw errors about certain lines in the code. The error I'm receiving is the following: "Can't understand this loop: 'loop lore of {_p}'s tool split at "||" '". Did skript receive an update and did they change the syntax of splitting strings? Anyway if anyone has the same issue and knows a solution or work around, please let me know! Thanks!
 

function getEnchantLevel(p: player, lore: text) :: integer:

	# this line no longer works
	loop lore of {_p}'s tool split at "||":

		if loop-value contains {_lore}:
			set {_n::*} to uncoloured loop-value split at " "
			return {_n::3} parsed as integer
			stop
	return 0

 

Edited by FlapKakker
Link to comment
Share on other sites

On 8/7/2021 at 2:33 PM, Razaire said:

is this is a release or help?

This was a request for help. However, I was able to solve the issue by replacing 

loop lore of {_p}'s tool split at "||": 

with

loop lore of {_p}'s tool:

seems like the game automatically treats a new line in a lore as the next loop value!

Edited by FlapKakker
Link to comment
Share on other sites

2 hours ago, FlapKakker said:

This was a request for help. However, I was able to solve the issue by replacing 

loop lore of {_p}'s tool split at "||": 

with

loop lore of {_p}'s tool:

seems like the game automatically threats a new line in a lore as the next loop value!

oh ok so you fixed your own problem alr..

  • Like 1

Every time you tell a lie, You'll have to tell a 100 more.

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