Gaming_47 Posted November 4, 2022 Share Posted November 4, 2022 Hello, I just want to ask if this is possible in gg.choice. If so, how? Thanks to whoever replies to this. This will be helpful for everyone. :)) ex. function example() list = gg.choice({ "Z", "F", "C", "A", "B" }) Link to comment Share on other sites More sharing options...
MAARS Posted November 4, 2022 Share Posted November 4, 2022 you can use table.sort your list, but for this you will need to create a separated list local list = { "z", "t", "a" } table.sort(list) gg.choice(list) but be aware that this modify the original table order Link to comment Share on other sites More sharing options...
Gaming_47 Posted November 4, 2022 Author Share Posted November 4, 2022 @MonkeySAN Let's say if I have 500 items in gg.choice how can we make those items alphabetically in order without doing it manually? function example() list = gg.choice({"Zebra", "Fish", "Cat", "Alligator", "Bat"}) because this will output: Zebra Fish Cat Alligator Bat when you call it right? Now, I want it to output in Alphabetical order: Alligator Bat Cat Fish Zebra But, let's say if I have 500 lists of items... How can we do this? Is it possible to do table.sort to do it? Thank you :)) Link to comment Share on other sites More sharing options...
blocx Posted November 4, 2022 Share Posted November 4, 2022 function displayed as u write u just write in alphabetical order ur script Link to comment Share on other sites More sharing options...
Gaming_47 Posted November 4, 2022 Author Share Posted November 4, 2022 @MAARS OMG Thanks so much!!! Link to comment Share on other sites More sharing options...
Question
Gaming_47
Hello, I just want to ask if this is possible in gg.choice. If so, how? Thanks to whoever replies to this. This will be helpful for everyone. :))
ex.
function example()
list = gg.choice({
"Z",
"F",
"C",
"A",
"B"
})
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.