Skript

Skript

743k Downloads

New loop-iteration conflict with region parser when setting variable, wrong error.

TheLimeGlass opened this issue ยท 0 comments

commented

Skript/Server Version

2.8.2
Paper 1.20.1

Bug Description

When using loop-iteration with no index defined, the error that should be printed is that there are multiple loop-iteration please suffix... but instead Skript attempts to parse this line as a Region. Wrong error provided but it erroring is a good thing. It should be erroring as a While loop can be used to count iterations.

Expected Behavior

To provide the correct error.

Steps to Reproduce

Load this code

command /test:
	trigger:
		set {_now} to now
		set {_colours::*} to "<##ff6f4b>", "<##800080>", "<##00ff00>", "<##fd5e68>", "&4", "<##fdbfb4>"
		while difference between now and {_now} is less than 10 seconds:
			loop {_colours::*}:
				set {_colour} to "%{_colours::%loop-iteration%}%"
			wait 5 ticks

Errors or Screenshots

2024-02-14_18 55 45

Other

This only happens when setting the variable to this String format.
I do not have the skript-worldguard addon installed, but I do have WorldGuard.
Providing loop-iteration-2 solves the issue.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.