Jump to content
  • 0

how to get a value that changes by another value that doesn't change with the offset


Mustang4409281

Question

Posted

I'm trying to get a value that changes for another value that doesn't change using displacement, but I'm not getting it, could someone help me with that? sorry for possible english errors, i'm using the translator

function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
p = {}
p = gg.getResults("1")
valor = {}
valor[1] = {}
valor[1].address = p[1].address + 0xBC --BC is offset
valor[1].flags = gg.TYPE_FLOAT
valor[1].value = 6
gg.setValues(valor)

Error:

lua:29

`valor[1].address = p[1].address + 0xBC --BC is offset`

attempt to index ? (a nil value) with key 'address' (field '1')

level = 1, const = 18, proto = 0, upval = 1, vars = 3, code = 45

GETTABLE v1 v1 "address"

4 answers to this question

Recommended Posts

Posted
function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
local p = gg.getResults(1)
  
local t = {}
t[1] = {}
t[1].address = p[1].address + 0xBC --BC is offset
t[1].flags = 16 -- is gg.TYPE_FLOAT
t[1].value = 6
gg.setValues(t)

 

Posted

or..

function TorreHack()
gg.setRanges(32)
gg.clearResults()
gg.searchNumber("-7,63805866e-37", gg.TYPE_FLOAT) --this value don't change
local p = gg.getResults(1)
  
gg.setValues({
      {address = p[1].address + 0xBC,flags = 16,value = 6} })

gg.toast("Done")
gg.clearResults()
end

 

Posted

I just solved this error, it was a trick of the float value, I don't know how to move with the right float so the value was wrong. thank you very much for the codes, this will help me a lot.

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.