Jump to content
RezaHaxz

how to change 1 value only

Recommended Posts

Posted (edited)

How to change 't1' value only? pls answer

example:

function A()

gg.searchNumber(500, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)

revert = gg.getResults(1)

local t = gg.getResults(1)

gg.addListItems(t)

gg.clearResults()

B()

end

 

function B()

gg.searchNumber(300, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)

revert1 = gg.getResults(1)

local t1 = gg.getResults(1)

gg.addListItems(t1)

gg.clearResults()

CH()

end

 

function CH()

for i, v in ipairs(t) do

 v.flags = gg.TYPE_DWORD 

  v.value = 5

 end

 gg.setValues(t) 

CH2()

end

 

function CH2()

for i, v in ipairs(t1) do

 v.flags = gg.TYPE_DWORD 

  v.value = 10

 end

 gg.setValues(t1) 

end

 

RESULTS = values 't' = 10

                        values 't1' = 10

 

i want is

RESULTS = values 't' = 5

                        values 't1' = 10

Edited by RezaHaxz

Share this post


Link to post
Share on other sites

Posted (edited)
function A()
gg.searchNumber(500, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
local t = gg.getResults(1)

for i, v in ipairs(t) do
     if v.flags == gg.TYPE_DWORD then
        v.value = 5
     end
end
gg.setValues(t)
gg.addListItems(t)
t = nil
gg.clearResults()
end

function B()
gg.searchNumber(300,gg.TYPE_DWORD, false,gg.SIGN_EQUAL, 0, -1)
local t1 = gg.getResults(1)

for i, v in ipairs(t1) do
      if v.flags == gg.TYPE_DWORD then
         v.value = 10
       end
end
gg.setValues(t1)
gg.addListItems(t1)
t = nil
gg.clearResults()
end

 

Edited by zam535582

Share this post


Link to post
Share on other sites
13 hours ago, zam535582 said:

function A()
gg.searchNumber(500, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
local t = gg.getResults(1)

for i, v in ipairs(t) do
     if v.flags == gg.TYPE_DWORD then
        v.value = 5
     end
end
gg.setValues(t)
gg.addListItems(t)
t = nil
gg.clearResults()
end

function B()
gg.searchNumber(300,gg.TYPE_DWORD, false,gg.SIGN_EQUAL, 0, -1)
local t1 = gg.getResults(1)

for i, v in ipairs(t1) do
      if v.flags == gg.TYPE_DWORD then
         v.value = 10
       end
end
gg.setValues(t1)
gg.addListItems(t1)
t = nil
gg.clearResults()
end

Thank you sir

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...