| View previous topic :: View next topic |
| Author |
Message |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Mon Dec 21, 2009 1:34 pm Post subject: Help on my Memory Engine |
|
|
So i'm coding a UCE from scratch, and so i'm stuck on converting a int to a byte:
| Code: |
int demonstration = 1;
BYTE demonstration_2 = (BYTE) demonstration;
ReadByte(0x00400000, demonostration_2);
|
Once I convert demonstration to a byte, I dont get 1, instead I get something else.
P.S. My Memory Engine is about 70% done, I got my GUI working (i'm coding it in a dll so I gotta use CreateWindowEx() for my forms), and I got my code down, just some major obstacles to finish and i'm done.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Mon Dec 21, 2009 4:22 pm Post subject: Re: Help on my Memory Engine |
|
|
| iPromise wrote: | So i'm coding a UCE from scratch, and so i'm stuck on converting a int to a byte:
| Code: |
int demonstration = 1;
BYTE demonstration_2 = (BYTE) demonstration;
ReadByte(0x00400000, demonostration_2);
|
Once I convert demonstration to a byte, I dont get 1, instead I get something else.
P.S. My Memory Engine is about 70% done, I got my GUI working (i'm coding it in a dll so I gotta use CreateWindowEx() for my forms), and I got my code down, just some major obstacles to finish and i'm done. |
the code posted above does seem to work properly to me , it only bugs if demonstration gets any higher than 255
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Mon Dec 21, 2009 5:23 pm Post subject: |
|
|
Hmm, I dont think so because whenever I do it that way, and compare my address list's results to cheat engine, its wrong, however when I just do plain:
| Code: |
ReadByte(0x00400000, 1)
|
Works fine
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Dec 21, 2009 7:29 pm Post subject: |
|
|
| show complete code
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Dec 21, 2009 8:41 pm Post subject: |
|
|
uh, 2 things come to mind.
1. what your compiler generating? i'd be surprised if it's not just something like:
mov dword ptr [d1], 1
mov al, byte ptr [d1]
mov byte ptr [d2], al
2. that looks like something it would just optimize into a constant anyway.
| Code: | int demonstration = 1;
BYTE demonstration_2 = (BYTE) demonstration; |
probably goes bye bye in release and just gets treated as a 1.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Tue Dec 22, 2009 5:48 am Post subject: |
|
|
would it be possible to do like this?
| Code: | int demonstration = 1;
BYTE demonstration_2 = *(BYTE*)&demonstration; |
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Tue Dec 22, 2009 11:30 am Post subject: |
|
|
@Anden100 I get a access violation when I debug it and try it your way
To everyone else that helped me, I will give you a free copy of my Memory Engine
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Tue Dec 22, 2009 11:46 am Post subject: |
|
|
| iPromise wrote: | | @Anden100 I get a access violation when I debug it and try it your way |
???, works completely fine to me, it might help to see some more of your source, to help you then
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Tue Dec 22, 2009 1:19 pm Post subject: |
|
|
| iPromise wrote: | | @Anden100 Add me: ***@hotmail.com |
No MSN -.-, use PM if you like to, but i do not promise that i am able to help you
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Tue Dec 22, 2009 5:28 pm Post subject: |
|
|
Got it fixed
It was a internal problem, my method were right but it was something else that caused it NOT to work.
|
|
| Back to top |
|
 |
|