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 indices expression throws errors when sorting a list with child values #6881

Closed
1 task done
mpschorr opened this issue Jul 7, 2024 · 0 comments
Closed
1 task done
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

@mpschorr
Copy link

mpschorr commented Jul 7, 2024

Skript/Server Version

[22:49:27 INFO]: [Skript] Server Version: git-Paper-550 (MC: 1.19.4)
[22:49:27 INFO]: [Skript] Skript Version: 2.8.7 (skriptlang-github)
[22:49:27 INFO]: [Skript] Installed Skript Addons: 
[22:49:27 INFO]: [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[22:49:27 INFO]: [Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[22:49:27 INFO]: [Skript]  - skript-yaml v1.5
[22:49:27 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[22:49:27 INFO]: [Skript]  - SkBee v3.5.5 (https://github.com/ShaneBeee/SkBee)
[22:49:27 INFO]: [Skript]  - SkJson v3.0.7 (https://www.skjson.xyz/)
[22:49:27 INFO]: [Skript] Installed dependencies: 
[22:49:27 INFO]: [Skript]  - Vault v1.7.3-b131
[22:49:27 INFO]: [Skript]  - WorldGuard v7.0.8+33cdb4a

Bug Description

Using the "sorted indices" pattern from ExprIndices

"[sorted] (indices|indexes) of %~objects% in (ascending|1¦descending) order",

Throws an internal error when sorting a list with child values, such as {_list::a} having the values {_list::a} = 123 and {_list::a::1} = 321.

Expected Behavior

Expected behavior

  1. Add this script snippet to your server:
command /debug:
    trigger:
        set {_test::1} to 111
        set {_test::2} to 555
        set {_test::3} to 444
        send (sorted indices of {_test::*} in ascending order)
  1. Run /debug
  2. See the expected output of 1, 3, 2

Steps to Reproduce

Bugged behavior

  1. Add this script snippet to your server:
command /debug:
    trigger:
        set {_test::1} to 111
        set {_test::2} to 555
        set {_test::3} to 444
        set {_test::1::a} to 2
        set {_test::2::b} to 3
        set {_test::3::c} to 6
        send (sorted indices of {_test::*} in ascending order)
  1. Run /debug
  2. See error in console

Errors or Screenshots

https://gist.github.com/mpschorr/8c016c197cb9c2dca0ab35be79254c0e

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@UnderscoreTud UnderscoreTud 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 Jul 8, 2024
@APickledWalrus APickledWalrus added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jul 27, 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