loop items from GUI and add only items to list variable, not air

  • 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!

Status
Not open for further replies.

Ubya

Member
Jun 15, 2020
10
0
1
27
i've been trying to find a solution for a few hours now, and i can't find anything.
this is the part that generates the list variable from the GUI inventory
Code:
loop 54 times:
            set {_loop} to loop-value - 1
            set {bingo.%{_loop}%} to slot {_loop} of player's current inventory
while this picks 30 random items from that list and shows them to the player in chat.
Code:
loop all players in world "Bingo":
            loop 30 times:
                set {_random} to a random integer between 0 and 53
                add {bingo.%{_random}%} to {bingo.%loop-player%::*}
            send "%{bingo.%loop-player%::*}%" to loop-player

issue is, it also saves and then shows air, while i want only items, how can i say to save only slots without air? or in the second part of the code how do i set it so that if {bingo.%{_random}%} is air to pick another?
 
Status
Not open for further replies.