Indices in the loop

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

SuperRcraft

Member
Apr 30, 2024
12
0
1
24
Code:
function ahOpen(p: player, page: number):

    open chest inventory with 6 rows named "&7Auction House - Listing" to {_p}

    set {_s} to 0

    loop sorted {ah::price::*}:

        set {_index} to {_page} * 45

        add {_s} to {_index}       

        if {ah::items::%{_index}%} is set:

            set slot {_s} of {_p}'s current inventory to {ah::items::%{_index}%} with lore "&fPrice: &a$%regex({ah::price::%{_index}%})%" and "&fSeller: &a%{ah::owner::%{_index}%}% "

        add 1 to {_s}

        if ({_s}) >= 45:

            exit loop
Is it possible to get the indices in the loop
 
indexes dont work because it returns {list::WHATEVER IS HERE} so if you're looping something that doesn't have numbers then its different.
you could try loop-item's indices