thats because floats are not 100% precise.
is there a method to write a float value to a address...I'm talking about Mw2..I want to edit the 'jump_height' value which is a float value by the way.The address is correct cause with TSearch it worked.
So i have:
With 4Byte addresses, it worked fine.Code:BYTE Jump[1] = {(float)1000}; BYTE Bg[1] = {(float)9999}; VirWrite(jmp, Jump, sizeof(Jump)); VirWrite(bgfall, Bg, sizeof(Bg));
The default value is 39.But after edited it's 39.000009 (or something like this)
So please help me I' want to learn
Last edited by ♪~ ᕕ(ᐛ)ᕗ; 03-10-2011 at 07:01 AM.
thats because floats are not 100% precise.
Last edited by Hell_Demon; 03-10-2011 at 07:22 AM.
Ah we-a blaze the fyah, make it bun dem!
A float is still 4 bytes long, so do something along the lines of
Code:float newValue = 39.0f; WriteProcessMemory(....&newValue, 4);
Ah we-a blaze the fyah, make it bun dem!
♪~ ᕕ(ᐛ)ᕗ (03-10-2011)
Last edited by ♪~ ᕕ(ᐛ)ᕗ; 03-10-2011 at 12:33 PM.
No problem
Ah we-a blaze the fyah, make it bun dem!
♪~ ᕕ(ᐛ)ᕗ (03-11-2011)