Writing/Reading data with base address + offset
Hello, today I was trying to start with game hacking when I came across a problem which I am now trying to solve for hours. I was trying to change my health in a game.
I'm trying to read and write data like this:
First I tried to get the base address with pointerscans:
Code:
int BASE = (int)Process.GetProcessesByName("GAME_NAME")[0].MainModule.BaseAddress;
int BASEOFFSET = 0x000B39F0;
int OFFSET1 = 0x8; <--------- health offset
int OFFSET2 = 0x268;
and then
Code:
ReadInteger(BASE + BASEOFFSET + OFFSET1 + OFFSET2);
It seems that I'm reading the wrong address, but I don't know what I have to do to fix this.
Can anyone help me with this problem?