[Help]WriteFloat

Posts 1–8 of 8 · Page 1 of 1
[Help]WriteFloat
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:
Code:
BYTE Jump[1] = {(float)1000};
BYTE Bg[1] = {(float)9999};

VirWrite(jmp, Jump, sizeof(Jump));
VirWrite(bgfall, Bg, sizeof(Bg));
With 4Byte addresses, it worked fine.
The default value is 39.But after edited it's 39.000009 (or something like this)
So please help me I' want to learn
thats because floats are not 100% precise.
Quote Originally Posted by Hell_Demon View Post
thats because floats are not 100% precise.
so what can I do to write the precise value?
Quote Originally Posted by user590177 View Post


so what can I do to write the precise value?
Nothing =)
and the .000009 difference won't matter
Quote Originally Posted by Hell_Demon View Post
Nothing =)
and the .000009 difference won't matter
well so I'm fucked up at this
Also I know that it doesn't matter, but I wanted to show you the difference between the old and the new value

OMG? So what method should I follow to write the float?
A float is still 4 bytes long, so do something along the lines of

Code:
float newValue = 39.0f;
WriteProcessMemory(....&newValue, 4);
Quote Originally Posted by Hell_Demon View Post
A float is still 4 bytes long, so do something along the lines of

Code:
float newValue = 39.0f;
WriteProcessMemory(....&newValue, 4);
well, I'm gonna try it, gonna report back for any result...

Edit:
WAAAAAAW! FFS! You're amazing!!!!
Thx 1K Times dudeeeee!
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Talk with us