Posted: Mon Nov 01, 2021 1:49 am Post subject: getAddress doesn't return offsets?
I have this code where I try to find the address of an item in my AddressList "Sun Azimuth":
Code:
for i = 1, 47, 1 do --How do I get the length of my AddressList?
if(getAddressList()[i].getDescription() == "Sun Azimuth") then
local base = getAddressList()[i]
print(getAddressList()[i].getAddress())
end
end
While the documentation says this will return the pointer with all of its offsets, I only get:
Code:
"Minecraft.Windows.exe"+04169158
The original Pointer is [[[["Minecraft.Windows.exe"+04169158]+40]+A0]+C0]+DC
What am I doing wrong here?
Is there a better way of achieving the same thing? _________________
It's easier to think of each entry as an object that contains properties, so you'll want to retrieve the object and then have access to its properties like so:
Code:
function getMemRec(desc)
local al = getAddressList()
local mr = al.getMemoryRecordByDescription(desc)
if mr ~= nil then
return mr
end
end
local myAddress = getMemRec('address description')
for i=0, myAddress.OffsetCount -1 do
-- For recognition purposes, format the offset in hexadecimal
print(string.format("%X", myAddress.Offset[i]))
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum