Marika Posted July 26, 2021 Share Posted July 26, 2021 Hello I need help again for a Lua script. I wrote for two searches. First one is saved as xcor and the second one is zcor. But only one of the search is save in the list. I think I am not having a good understanding of addlistitem but I could not find how it works. Thank u! --SEARCH THE ADDRESS gg.searchAddress('7D6F704610') xcor = gg.getResults(2) xcor = gg.getValues(xcor) --FREEZE THE CORDINATE VALUE for i , v in ipairs(xcor) do v.value = xcor[2].value v.freeze = true end gg.addListItems(xcor) --SEARCH THE ADDRESS gg.searchAddress('7D6F704618') zcor = gg.getResults(2) zcor = gg.getValues(zcor) --FREEZE THE CORDINATE VALUE for i , v in ipairs(zcor) do v.value = zcor[2].value v.freeze = true end gg.addListItems(zcor) Link to comment Share on other sites More sharing options...
HEROGAMEOfficial Posted July 26, 2021 Share Posted July 26, 2021 gg.searchAddress('7D6F704610') xcor = gg.getResults(gg.getResultsCount()) xcor = gg.getValues(xcor) gg.clearResults() for a, b in next, xcor do b.value = b.value--Change value. b.freeze = true end gg.addListItems(xcor) Your gg.searchAddres results its one. Link to comment Share on other sites More sharing options...
Marika Posted July 26, 2021 Author Share Posted July 26, 2021 22 minutes ago, HEROGAMEOfficial said: gg.searchAddress('7D6F704610') xcor = gg.getResults(gg.getResultsCount()) xcor = gg.getValues(xcor) gg.clearResults() for a, b in next, xcor do b.value = b.value--Change value. b.freeze = true end gg.addListItems(xcor) Your gg.searchAddres results its one. Thank u so much! I could save 2. And now I understand how addListItems works! Link to comment Share on other sites More sharing options...
Question
Marika
Hello I need help again for a Lua script. I wrote for two searches. First one is saved as xcor and the second one is zcor.
But only one of the search is save in the list.
I think I am not having a good understanding of addlistitem but I could not find how it works.
Thank u!
--SEARCH THE ADDRESS
gg.searchAddress('7D6F704610')
xcor = gg.getResults(2)
xcor = gg.getValues(xcor)
--FREEZE THE CORDINATE VALUE
for i , v in ipairs(xcor) do
v.value = xcor[2].value
v.freeze = true
end
gg.addListItems(xcor)
--SEARCH THE ADDRESS
gg.searchAddress('7D6F704618')
zcor = gg.getResults(2)
zcor = gg.getValues(zcor)
--FREEZE THE CORDINATE VALUE
for i , v in ipairs(zcor) do
v.value = zcor[2].value
v.freeze = true
end
gg.addListItems(zcor)
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.