menu = gg.multiChoice({'Auto','Dword','Float','Double','Word','Byte','Qword','Xor'},nil,'What type to search?')
if menu == nil then
else
if menu[1] then
a = 1
type = gg.TYPE_AUTO
end
if menu[2] then
a = 1
type = gg.TYPE_DWORD
end
if menu[3] then
a = 1
type = gg.TYPE_FLOAT
end
if menu[4] then
a = 1
type = gg.TYPE_DOUBLE
end
if menu[5] then
a = 1
type = gg.TYPE_WORD
end
if menu[6] then
a = 1
type = gg.TYPE_BYTE
end
if menu[7] then
a = 1
type = gg.TYPE_QWORD
end
if menu[8] then
a = 1
type = gg.TYPE_XOR
end
end
while a == 0 do
a = 0
menu = gg.multiChoice({'Auto','Dword','Float','Double','Word','Byte','Qword','Xor',},nil,'What type to search?')
if menu == nil then
else
if menu[1] then
a = 1
type = gg.TYPE_AUTO
end
if menu[2] then
a = 1
type = gg.TYPE_DWORD
end
if menu[3] then
a = 1
type = gg.TYPE_FLOAT
end
if menu[4] then
a = 1
type = gg.TYPE_DOUBLE
end
if menu[5] then
a = 1
type = gg.TYPE_WORD
end
if menu[6] then
a = 1
type = gg.TYPE_BYTE
end
if menu[7] then
a = 1
type = gg.TYPE_QWORD
end
if menu[8] then
a = 1
type = gg.TYPE_XOR
end
end
end
end
function selectranges()
menu = gg.multiChoice({'Jh: Java heap','Ch: C++ heap','Ca: C++ alloc','Cd: C++ .data','Cb: C++ .bss','PS:PPSSPP','A: Anonymous','J: Java','S: Stack','A: Ashmen','V: Video','O: Other','B: Bad','Xa: Code app','Xs: Code system','Reset','All'},nil,"Select memory ranges. If you don’t know what this is, select “All”.")
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.
Question
HorridModz
Look at function number 2 (selectconditions) and the last function (searchandrefine).
When I run this and select some stuff, it says there is an attempt to index a nil value (encrypted) in function searchandrefine.
But I clearly define encrypted as encrypted = gg.multiChoice in function selectconditions.
Can someone please fix my code? Thanks!
function wait_for_action()
gg.setVisible(false)
while true do
gg.sleep(500)
if gg.isVisible()then
break
end
end
end
function selectconditions(encrypted)
if encrypted == 1 then
encrypted = gg.multiChoice({'Encrypted'},nil,'Is the value encrypted?')
end
signs = {gg.SIGN_EQUAL,gg.SIGN_NOT_EQUAL,gg.SIGN_GREATER_,gg.SIGN_LESS,gg.SIGN_GREATER_OR_EQUAL,gg.SIGN_LESS_OR_EQUAL}
signchoice = gg.multiChoice({'=',' ≠','>','<',' ≥','≤'},nil,'What condition?')
i = 0
while not signchoice[i] do
i = i + 1
end
sign = signs[i]
end
function selecttype()
menu = gg.multiChoice({'Auto','Dword','Float','Double','Word','Byte','Qword','Xor'},nil,'What type to search?')
if menu == nil then
else
if menu[1] then
a = 1
type = gg.TYPE_AUTO
end
if menu[2] then
a = 1
type = gg.TYPE_DWORD
end
if menu[3] then
a = 1
type = gg.TYPE_FLOAT
end
if menu[4] then
a = 1
type = gg.TYPE_DOUBLE
end
if menu[5] then
a = 1
type = gg.TYPE_WORD
end
if menu[6] then
a = 1
type = gg.TYPE_BYTE
end
if menu[7] then
a = 1
type = gg.TYPE_QWORD
end
if menu[8] then
a = 1
type = gg.TYPE_XOR
end
end
while a == 0 do
a = 0
menu = gg.multiChoice({'Auto','Dword','Float','Double','Word','Byte','Qword','Xor',},nil,'What type to search?')
if menu == nil then
else
if menu[1] then
a = 1
type = gg.TYPE_AUTO
end
if menu[2] then
a = 1
type = gg.TYPE_DWORD
end
if menu[3] then
a = 1
type = gg.TYPE_FLOAT
end
if menu[4] then
a = 1
type = gg.TYPE_DOUBLE
end
if menu[5] then
a = 1
type = gg.TYPE_WORD
end
if menu[6] then
a = 1
type = gg.TYPE_BYTE
end
if menu[7] then
a = 1
type = gg.TYPE_QWORD
end
if menu[8] then
a = 1
type = gg.TYPE_XOR
end
end
end
end
function selectranges()
menu = gg.multiChoice({'Jh: Java heap','Ch: C++ heap','Ca: C++ alloc','Cd: C++ .data','Cb: C++ .bss','PS:PPSSPP','A: Anonymous','J: Java','S: Stack','A: Ashmen','V: Video','O: Other','B: Bad','Xa: Code app','Xs: Code system','Reset','All'},nil,"Select memory ranges. If you don’t know what this is, select “All”.")
ranges = ""
if menu[1] then
ranges = ranges .. "gg.REGION_JAVA_HEAP | "
end
if menu[2] then
ranges = ranges .. "gg.REGION_C_HEAP | "
end
if menu[3] then
ranges = ranges .. "gg.REGION_C_ALLOC | "
end
if menu[4] then
ranges = ranges .. "gg.REGION_C_DATA | "
end
if menu[5] then
a = 1
type = gg.TYPE_WORD
end
if menu[6] then
a = 1
type = gg.TYPE_BYTE
end
if menu[7] then
a = 1
type = gg.TYPE_QWORD
end
if menu[8] then
a = 1
type = gg.TYPE_XOR
end
gg.setRanges(ranges)
end
end
function searchandrefine()
gg.clearResults()
selecttype()
selectconditions(1)
value = gg.prompt({[1] = 'What is the value?'},
{[1] = '0'},
{[1] = 'text'})
gg.searchNumber(value[1], type, encrypted[1], sign)
while gg.getResultsCount() > 10 do
gg.alert('Make the value change, then click the gameguardian icon.')
wait_for_action()
gg.refineNumber(value[1], type, encrypted[1], sign)
value = gg.prompt({[1] = 'What has the value changed to?'},
{[1] = '0'},
{[1] = 'text'})
end
continue = gg.multiChoice({'There are' .. gg.getResultsCount() .. 'results left. Would you like to continue refining?'},nil,'')
while continue[1] or gg.getResultsCount() < 2 do
gg.alert('Make the value change, then click the gameguardian icon.')
wait_for_action()
gg.refineNumber(value[1], type, encrypted[1], sign)
value = gg.prompt({[1] = 'What has the value changed to?'},
{[1] = '0'},
{[1] = 'text'})
continue = gg.multiChoice({'There are' .. gg.getResultsCount() .. 'results left. Would you like to continue refining?'},nil,'')
end
end
searchandrefine()
10 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now