View previous topic :: View next topic |
Author |
Message |
itsoqrappy Advanced Cheater Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Sun Apr 24, 2016 3:43 pm Post subject: Bad float precision while writing to an address |
|
|
I'm trying to write to an address (fly address) a float value. For example, I go to CheatnEngine and I set the address' value from 0 (ground value) to 500.
Here I can see the flying effect, everything works properly ... but, when I try to set it in C++ it's like i set the flying address from 0 (ground value) to 2 (superlittle jump lol)... So I've just thought the problem was a bad float digit precision.
I've already tried and retiried the code and it works properly in other games too... Here it is :
Quote: | *(DWORD*)(myAddy) = (float)500; |
Why doesn't it work, or better, does that strange effect? Any tip?
@ParkourPenguin
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Apr 24, 2016 7:43 pm Post subject: |
|
|
*(float*)(myAddy) = 500.0f;
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Apr 24, 2016 11:02 pm Post subject: Re: Bad float precision while writing to an address |
|
|
itsoqrappy wrote: | @ParkourPenguin | -Stop calling people out...it's annoying. If you want to address someone specifically, send them a PM. If you can't PM yet, then just wait until you can and post your questions for all in the interim.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4302
|
Posted: Sun Apr 24, 2016 11:47 pm Post subject: |
|
|
What ++METHOS said. I don't even know why you're asking for my help with C++. I'm not that good at it and there are many other people on this site that can help you out significantly more than I can.
Just judging based on your last few topics, you should ascertain your comprehension of C++. While you may sometimes know what to write down to make something work, it's pretty clear you don't understand what you're writing down. If you take the time to actually learn what you're doing instead of just memorizing it, you'll find that you won't make as many mistakes later on, saving you time in the long run.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
itsoqrappy Advanced Cheater Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Mon Apr 25, 2016 4:29 pm Post subject: |
|
|
Dark Byte wrote: | *(float*)(myAddy) = 500.0f; |
Ok, now it works. Anyhow
I'm reading another pointer with this code:
Quote: | auto baseAddress = (DWORD)::GetModuleHandle(nullptr);
auto address = *(DWORD*)(baseAddress + ANOTHERADDY);
|
why doesn't it work? With some others pointers it works...
Yes, offsets and ANOTHERADDY are correct, I've checked it 15 times.
Last edited by itsoqrappy on Wed Apr 27, 2016 12:02 pm; edited 1 time in total |
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4302
|
Posted: Mon Apr 25, 2016 4:43 pm Post subject: |
|
|
What's the pointer path of it when it's working in CE? I can't think of anything else that's wrong besides thefourth being functionally useless.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
itsoqrappy Advanced Cheater Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Mon Apr 25, 2016 4:53 pm Post subject: |
|
|
ParkourPenguin wrote: | What's the pointer path of it when it's working in CE? I can't think of anything else that's wrong besides thefourth being functionally useless. |
Yeah I tried deleting that line too but still nothing... the offsets, addys etc. are not wrong (don't worry for that, i took 3 hours to recheck everything, btw i cant screen anyway right now because im out with my sister's pc).
Any idea? I would need to try with VirtualProtect but im not sure, cuz i didnt need of it when working with all other pointers in the same game.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Tue Apr 26, 2016 4:02 am Post subject: |
|
|
Quote: |
auto baseAddress = (DWORD)::GetModuleHandle(nullptr);
auto address = *(DWORD*)(baseAddress + ANOTHERADDY);
|
If this is your idea of what modulename+offset means (e.g game.exe+4abcdef0 and you assume ANOTHERADDY is 4abcdef0 ) then it's wrong.
it should then be:
Code: |
auto baseAddress = (DWORD)::GetModuleHandle(nullptr);
auto address =baseAddress + ANOTHERADDY;
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|