Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type of some list expressions #3952

Conversation

TPGamesNL
Copy link
Member

Description

Fixes the return type of some list expressions: ExprSortedList, ExprShuffledList, ExprReversedList.

All 3 loops in this code don't parse without this PR (with error loop-value is not a text):

command /test:
	trigger:
		set {_l::*} to 5 times
		loop reversed indices of {_l::*}:
			set {_i} to (loop-value) parsed as integer
			message "%loop-value% ; %{_i}%"
		loop shuffled indices of {_l::*}:
			set {_i} to (loop-value) parsed as integer
			message "%loop-value% ; %{_i}%"
		loop sorted indices of {_l::*}:
			set {_i} to (loop-value) parsed as integer
			message "%loop-value% ; %{_i}%"
		

Target Minecraft Versions: any
Requirements: none
Related Issues: #3492

@TPGamesNL TPGamesNL added 2.5 bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. labels May 8, 2021
@TPGamesNL TPGamesNL requested a review from FranKusmiruk May 8, 2021 15:55
@APickledWalrus APickledWalrus merged commit 4f9cd44 into SkriptLang:master May 9, 2021
@TPGamesNL TPGamesNL deleted the fix/list-expressions-wrong-return-type branch May 10, 2021 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants