Jump to content
  • 0

[Solved] Negative memory addresses


thisme

Question

Posted

I have a script which prints the memory addresses of some in game values, but they are negative:

-1462043392 (in hex: -57250300)
-1462043388
-1462043384
-1462043380
-1462043376
-1462043372
-1462043368

Is this a fault with Lua or GameGuardian? How do I get the real ones?

2 answers to this question

Recommended Posts

Posted

Don't use print directly, format it first:

print(string.format("%x", target.address)))

This may yield things like ffffffffa8dafd00, but just ignore the fs in front.

So the actual address is a8dafd00, which GG finds easily.

Posted

try this.

 

function tohex(val)

  if not gg.getTargetInfo().x64 and val<0 then val=val&0xffffffff end

  return string.format('%x', val)

end

 

print(tohex(-1462043380))

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.