Jump to content
  • 0

Using dec to hex converter for address search


AKRAMRAZA

Question

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

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • Administrators
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.

Link to comment
Share on other sites

 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.

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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'.

Link to comment
Share on other sites

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.