[ @_yourram ]
---
No, you can still obtain all the value from the saved list and filter the items based on 'name'. In your script, you didn't even add 'name' key into 'control' table, you just straight add them all:
control = gg.getResults(10)
gg.addListItems(control)
---
gg.loadResults(gg.getListItems(control))
This is wrong, gg.getListItems(): will take all items from savedlist, you can't specified it. What you can is:
gg.loadResults(control)
---
while true do
if gg.isVisible() then
gg.setVisible(false)
Main()
end
end
end
This part is wrong, you have multiple 'end' just for 'Main()' function. It will also contradict another 'while true do' you put earlier.
---
Here I fixed it:
function menus()
choices = gg.choice({'Prepare Values','Search','Undo','Exit'})
if choices == nil then
os.exit()
else
if choices == 4 then
os.exit()
else
prepares(choices)
end
end
end
function prepares(choices)
if choices == 1 then
-------------control--------------------
gg.searchNumber('55;873', 16)
gg.refineNumber('55', 16)
control = gg.getResults(gg.getResultsCount())
gg.clearResults()
-------------health --------------------
gg.searchNumber('47;67', 16)
gg.refineNumber('47', 16)
health = gg.getResults(gg.getResultsCount())
gg.clearResults()
-------------energy --------------------
gg.searchNumber('666;32;47', 16)
gg.refineNumber('47', 16)
energy = gg.getResults(gg.getResultsCount())
gg.clearResults()
elseif choices == 2 then
-------------control--------------------
gg.loadResults(control)
gg.editAll('-55', gg.TYPE_FLOAT)
gg.clearResults()
-------------health --------------------
gg.loadResults(health)
gg.editAll('0', gg.TYPE_FLOAT)
gg.clearResults()
-------------energy --------------------
gg.loadResults(energy)
gg.editAll('999', gg.TYPE_FLOAT)
gg.clearResults()
elseif choices == 3 then
-------------control--------------------
gg.loadResults(control)
gg.editAll('55', gg.TYPE_FLOAT)
gg.clearResults()
-------------health --------------------
gg.loadResults(health)
gg.editAll('47', gg.TYPE_FLOAT)
gg.clearResults()
-------------energy --------------------
gg.loadResults(energy)
gg.editAll('47', gg.TYPE_FLOAT)
gg.clearResults()
end
end
knxs = false
while true do
if gg.isVisible(true) then
knxs = true
else
knxs = false
end
if knxs == true then
menus()
else
gg.setVisible(false)
end
end
---