Jump to content
  • 0

AddListItems


Ashleycolton

Question

When i use float here in gg.addListItems it works fine but when i change to gg.TYPE_DWORD and value to 8200 it did not set the value to 8200.. what went wrong?

 

function dirtyblue()
gg.clearResults()
gg.setRanges(gg.REGION_VIDEO)
gg.searchNumber("1.14906474e-41;1.14920487e-41;1.149345e-41:17", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,0,-1)
gg.refineNumber("1.149345e-41", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(3)
gg.editAll("1.74966126e-41", gg.TYPE_FLOAT)
n=gg.getResultCount()
jz=gg.getResults(n)
if gg.getResultCount() == 0 then
gg.toast("无搜索数值")
else
for i=1, n do
gg.addListItems({[1] = {address =jz.address+0,flags = gg.TYPE_FLOAT,freeze = false, value = 1.74966126e-41}})
gg.clearResults()
end end
gg.clearResults()
gg.toast("dirty blue")
end

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

1 hour ago, Enyby said:

You must show code which you try execute. I can not see gg.TYPE_DWORD in any place of it.

function dirtyblue()
gg.clearResults()
gg.setRanges(gg.REGION_VIDEO)
gg.searchNumber("8200;8201;8202", gg.TYPE_DWORD, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(3)
n=gg.getResultCount()
jz=gg.getResults(n)
if gg.getResultCount() == 0 then
gg.toast("无搜索数值")
else
for i=1, n do
gg.addListItems({[1] = {address =jz.address+0,flags = gg.TYPE_DWORD,freeze = false, value = '8209'}})
gg.addListItems({[2] = {address =jz.address+0,flags = gg.TYPE_DWORD,freeze = false, value = 8209}})
gg.addListItems({[3] = {address =jz.address+0,flags = gg.TYPE_DWORD,freeze = false, value = 8209}})
gg.clearResults()
end end
gg.toast("dirty blue")
end

Link to comment
Share on other sites

  • Administrators

addListItems do not change value. Only add items to list. You need call editAll or setValues before or after add to saved list.

2 hours ago, Ashleycolton said:

All i did was changing the type from Float to DWORD and value 

Wrong.

You remove line

7 hours ago, Ashleycolton said:

gg.editAll("1.74966126e-41", gg.TYPE_FLOAT)

 

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.