you posted the issue by yourself
Code:base address = 00400000 // <- not an hex value, maybe you mean 0x400000 ? + LocalPlayerOffset = 0x109B74
Hello guys,
I am having an issue with adding the LocalPlayer Offset to the Base Address of a game (Assault Cube).
The values i want to add together are:
base address = 00400000
+
LocalPlayerOffset = 0x109B74
(Look at the Screenshot of the Code in the Attachments)
and as you can see in the console the result is 00826DD0
but this is wrong and i checked it in the internet with an hex calculator and there the result was correct
(Look at the Screenshot of the Hex Calculator in the Attachments)
the actual result should be 00509B74
My Question is, why does visual studio calculate these two values wrong (different)?
Appreciate any help that i receive!
Best regards,
TryToCheat00
you posted the issue by yourself
Code:base address = 00400000 // <- not an hex value, maybe you mean 0x400000 ? + LocalPlayerOffset = 0x109B74
there is alot wrong in your picture, for starters for assualt cube it has a static base so you don't need to add it in the first place just use the final address, secondly you should use the multiplayer base and not the single player base, thirdly your making everything a pointer to the value when u need to just add the value itself.
should be more along the lines of
uintptr_t base = 0x400000;
uintptr_t localPlayerBase = 0x109B74; //wrong btw
uintptr_t localPlayer = base + localPlayerBase; //this will do the simple addition you want but you actually need the value contained here. so learn how pointers work and this will be easy for you