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

Sorted indexes of string lists not comparing strings #6492

Closed
1 task done
ShaneBeee opened this issue Mar 13, 2024 · 1 comment
Closed
1 task done

Sorted indexes of string lists not comparing strings #6492

ShaneBeee opened this issue Mar 13, 2024 · 1 comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@ShaneBeee
Copy link
Contributor

Skript/Server Version

[13:42:58 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[13:42:58 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[13:42:58 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[13:42:58 INFO]: [Skript] Server Version: git-Paper-450 (MC: 1.20.4)
[13:42:58 INFO]: [Skript] Skript Version: 2.8.2 (selfbuilt-unknown)
[13:42:58 INFO]: [Skript] Installed Skript Addons: 
[13:42:58 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[13:42:58 INFO]: [Skript]  - SkBee v3.4.1 (https://github.com/ShaneBeee/SkBee)
[13:42:58 INFO]: [Skript]  - SkBriggy v1.2.0
[13:42:58 INFO]: [Skript] Installed dependencies: 
[13:42:58 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

When using the sorted indexes expression, strings are not getting sorted, whereas numbers are.

Expected Behavior

That they're sorted by string.

Steps to Reproduce

test code:

on load:
	set {-test::a} to "Bob"
	set {-test::b} to "Donald"
	set {-test::c} to "Zeffer"
	set {-test::d} to "Angus"
	set {-test::e} to "Kevin"

	set {_indexes::*} to sorted indices of {-test::*} in ascending order

	send {_indexes::1}
	send {-test::%{_indexes::1}%}

output:

[13:44:16 INFO]: a
[13:44:16 INFO]: Bob

"Angus" should be first

Testing with numbers:

on load:
	set {-test::a} to 99
	set {-test::b} to 1
	set {-test::c} to 100
	set {-test::d} to -50
	set {-test::e} to 777

	set {_indexes::*} to sorted indices of {-test::*} in ascending order

	send {_indexes::1}
	send {-test::%{_indexes::1}%}

output:

[13:44:50 INFO]: d
[13:44:50 INFO]: -50

This is correct

Errors or Screenshots

no errors

Other

I like turtles! 🐢

Agreement

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

Yes.. a very troubling issue, indeed. Been struggling with this for two days, now.

@AyhamAl-Ali AyhamAl-Ali added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Mar 13, 2024
@sovdeeth sovdeeth added the PR available Issues which have a yet-to-be merged PR resolving it label Mar 21, 2024
@sovdeeth sovdeeth added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Apr 2, 2024
@sovdeeth sovdeeth closed this as completed Apr 2, 2024
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. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

4 participants