Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Memory scanning problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Immons
How do I cheat?
Reputation: 0

Joined: 21 May 2011
Posts: 9

PostPosted: Sat May 21, 2011 6:58 am    Post subject: Memory scanning problem Reply with quote

Hello guys, I have problem while scanning memory of Lineage2 game. I have address that in cheat engine I added by "Add address manually" - it has Value 4356 - that it had to have but when I go to "Browse memory region" at that address it shows me only 4 and the next is DEC 17(HEX 11). In C# I tried to read that memory address using:

Code:
pReader.OpenProcess();

            int bytesReaded;
            int CurrentCP;
            byte[] memory;
            int CPaddress = 0x07756240;

            memory = pReader.ReadProcessMemory((IntPtr)CPaddress, 4, out bytesReaded);
            CurrentCP = memory[0];
            label1.Text = CurrentCP.ToString();

            pReader.CloseHandle();


but it also returns 4 only... Any idea how to rea whole Value ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Sat May 21, 2011 8:49 am    Post subject: Reply with quote

4356 = 04 11
a 2 byte value (at least)

anyhow, your error is using byte[] memory
CurrentCP = memory[0]; writes the first byte to currentCP and ignores the second

Not sure if c# supports it, but try typecasting the pointer to memory to a word[] type
or else just do memory[0]+(memory[1] << 8)

_________________
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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites