Jump to content
  • 0

Using dec to hex converter for address search


AKRAMRAZA

Question

Posted

I am trying to make a Function to get the address of a number and use it back again.But the problem is when I get the address it gives me in decimal instead of hex . And gg cannot use decimal numbers as address so I perform lua dec to hex on it.But , the problem is after performing lua dec to hex on it I get the hex value with two extra 0 at the end.And this changes everything and cannot be used.I have attached my code below can anyone plz help ????
 

gettingAddress.lua

6 answers to this question

Recommended Posts

  • Administrators
Posted
y = string.format("%x", z*256)

 

44 minutes ago, AKRAMRAZA said:

I get the hex value with two extra 0 at the end.

Of course. You multiply value to 256. What you expecting else? 256 is 0x100.

Posted

 So how do I get the address in it's hex form? Because after accessing the table , it gives the address in decimal form.

[added 1 minute later]
21 minutes ago, Enyby said:

y = string.format("%x", z*256)

 

Of course. You multiply value to 256. What you expecting else? 256 is 0x100.

 

22 minutes ago, Enyby said:

y = string.format("%x", z*256)

 

Of course. You multiply value to 256. What you expecting else? 256 is 0x100.

So how do I get the hex address in it's original hex form ? Because accessing the values table gives address in decimal form and it cannot be used in gg back again to search that address.

Posted
44 minutes ago, AKRAMRAZA said:

 So how do I get the address in it's hex form? Because after accessing the table , it gives the address in decimal form.

[added 1 minute later]

 

So how do I get the hex address in it's original hex form ? Because accessing the values table gives address in decimal form and it cannot be used in gg back again to search that address.

I fixed it thanks for helping..

Posted
8 hours ago, Enyby said:

y = string.format("%x", z*256)

 

Of course. You multiply value to 256. What you expecting else? 256 is 0x100.

Also can you help me when I access the table and get the address value from it why always first time it says nil.I search the number it finds it but for getting the address it says "Attempt to index nil value with key 'address'.

Posted
1 hour ago, Enyby said:

Because you Attempt to index nil value with key 'address'.

Ok thanks ♥️. I will fix it 

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.