How can i add names to the gg.choice on loop?
For each iteration it has to add a new string. When the loop is finished gg.choice has to show all the strings.
testSetting ={}
isUserSetting ={}for i, v in ipairs(isUser)doif isBotBool[i].value ==1then
isBotValue ="A.I."elseif isBotBool[i].value ==0then
isBotValue ="Human"end
isUserSetting[i]={"Nickname: "..v.name.." |User ID: "..v.value.." |Controller: "..isBotValue..""}
testSetting[i]={address = v.address, flags = gg.TYPE_DWORD, name ="Nickname: "..v.name.." | Controller: "..isBotValue.." | User ID: "..v.value}endfor i, v in ipairs(isUserSetting)do
testof = gg.choice(isUserSetting[i])-- needs to show all user settings at once instead of one by oneend
gg.addListItems(testSetting)
gg.toast("Player saved in the saved list")
If loop only has to loop twice it should look like this:
With script provided above it will always show 1 string. Which i don't want because user will have to press through all the string results.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
nok1a
How can i add names to the gg.choice on loop?
For each iteration it has to add a new string. When the loop is finished gg.choice has to show all the strings.
If loop only has to loop twice it should look like this:
With script provided above it will always show 1 string. Which i don't want because user will have to press through all the string results.
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.