Jump to content
  • 0

I can not save multiple searches's results using addListItems


Marika

Question

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.