Pymem Could not read memory at: , length: 4 - GetLastError: 299

464 Views Asked by At
from pymem import *
from pymem.process import *


pm = pymem.Pymem("SHIFT.exe")

gameModule = module_from_name(pm.process_handle , "SHIFT.exe").lpBaseOfDll

def GetptrAddr(base , offsets):

    addr = pm.read_int(base)
    for i in offsets:
        if i != offsets[-1]:
            addr = pm.read_int(addr + i) #problem --> Could not read memory at: 1715211616, length: 4 - GetLastError: 299
    return addr + offsets[-1]

while True:
    pm.write_int(GetptrAddr(gameModule + 0x001F30AC, [0x8E4,0x2C,0x20,0x14,0x10,0x28,0x5C]),11)

I use Cheat engine and Pymem to change the timer in game but it doesn't work.

Cheat Engine7.4 Pointer: Cheat Engine7.4 Pointer Image

Pymem Error: Cheat Engine7.4 Pointer Image

1

There are 1 best solutions below

2
On BEST ANSWER

try to change this line

gameModule = module_from_name(pm.process_handle , "SHIFT.exe").lpBaseOfDll

to this line

gameModule = module_from_name(pm.process_handle , "mono.dll").lpBaseOfDll