title: How do i read memory using pymem?
body: <p>this code writes and reads memory from a program. the program is built in 64bit.
  i have no problem using mem.write_float but when using mem.read, an error occurs</p>
  <pre><code>pymem.exception.MemoryReadError: Could not read memory at: 16, length: 8 - GetLastError: 29
  </code></pre>
  <p>does anyone have idea?</p>
  <pre><code>from pymem import *
  from pymem.process import *
  
  
  mem = Pymem(&quot;###.exe&quot;)
  game_module = module_from_name(mem.process_handle, &quot;###.exe&quot;).lpBaseOfDll
  
  
  def getPtrAddr(address, offsets):
      addr = mem.read_longlong(address)
      for offset in offsets:
          if offset != offsets[-1]:
              addr = mem.read_longlong(addr + offset)
      addr = addr + offsets[-1]
      return addr
  
  while True:
  
      mem.write_float(getPtrAddr(game_module + 0x06D26780, [0x28, 0x20, 0X08, 0x08, 0x170, 0x10, 0xE8]), 1000.233)
      
      mem.read_longlong(getPtrAddr(game_module + 0x06D26780, [0x28, 0x20, 0X08, 0x08, 0x170,0x10, 0xE8]))
  </code></pre>