trying to read float value but it giving error it says address must be int even though I use read_float and it makes an error it cant read it says address must be int
from pymem import *
from pymem.process import *
pm = pymem.Pymem("game.exe")
module = module_from_name(pm.process_handle, "game.exe").lpBaseOfDll
def GetPtrAddr(base, offsets):
addr = pm.read_float(base)
for i in offsets:
if i != offsets[-1]:
addr = pm.read_float(addr + i)
return addr + offsets[-1]
northsouth = GetPtrAddr(module + 0x01B20C50, [0x38, 0x60, 0x290, 0x68, 0x140, 0x0, 0x3C])
print(pm.read_float(northsouth))
Traceback (most recent call last):
File "C:\Users\user\Desktop\program\3erfwq.py", line 14, in <module>
northsouth = GetPtrAddr(module + 0x01B20C50, [0x38, 0x60, 0x290, 0x68, 0x140, 0x0, 0x3C])
File "C:\Users\user\Desktop\program\3erfwq.py", line 12, in GetPtrAddr
addr = pm.read_float(addr + i)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\pymem\__init__.py", line 650, in read_float
value = pymem.memory.read_float(self.process_handle, address)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\pymem\memory.py", line 377, in read_float
bytes = read_bytes(handle, address, struct.calcsize('f'))
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\pymem\memory.py", line 97, in read_bytes
raise TypeError('Address must be int: {}'.format(address))
TypeError: Address must be int: 1994287160.0