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 


Multi level pointers adding up wrong

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
FrequentlyX
Newbie cheater
Reputation: 0

Joined: 29 Dec 2013
Posts: 14

PostPosted: Tue Aug 12, 2014 9:06 am    Post subject: Multi level pointers adding up wrong Reply with quote

Hey guys, i was wondering if anyone here could help me out with my code.
so this is what i have :

Code:
int PlayerBase = 0x20440CC;
int[] PlayerMultiLvl = new int[] { 0x14, 0x40, 0x10};
PlayerData PlayerOffsets = new PlayerData(0x4, 0xC, 0x8, 0x48);


and when i try to use it.

Code:

int playerBase = Mem.ReadMultiLevelPointer(Player.baseAddress, 4, Player.multiLevel);
//Player.offsets.health = 0x48 as declared above
HealthLBL.Text = Mem.ReadInt(playerBase + Player.offsets.health).ToString();



However this gives me a 0, but when i try to do it this way it gfives me the correct value.

Code:
int PlayerBase = 0x20440CC;
int[] PlayerMultiLvl = new int[] { 0x14, 0x40, 0x10, 0x38};
PlayerData PlayerOffsets = new PlayerData(0x4, 0xC, 0x8, 0x10);


and then using it
Code:
int playerBase = Mem.ReadMultiLevelPointer(Player.baseAddress, 4, Player.multiLevel);

//Player.Offsets.health = 0x10 as declared above
HealthLBL.Text = Mem.ReadInt(playerBase + Player.offsets.health).ToString();


so i acctually have to add 0x38 to the PlayerMultiLvl and then adding 0x10 to it to get to 0x48 and get the correct value.
but the way i want to do it is like in the first code.
having PlayerMultiLvl = new int[] { 0x14, 0x40, 0x10};
and then adding 0x48 later.

does anyone have any idea of how i can achieve this ?
Back to top
View user's profile Send private message
Xathan
Advanced Cheater
Reputation: 1

Joined: 19 Jun 2014
Posts: 72

PostPosted: Tue Aug 12, 2014 11:43 am    Post subject: Re: Multi level pointers adding up wrong Reply with quote

A difference I see is that there is no fourth PlayerMultiLvl entry. Perhaps you can try to just add 0x00 as last value. Perhaps then it could work. Everything else seems to be the same to me. Just a try worth Wink
-> int[] PlayerMultiLvl = new int[] { 0x14, 0x40, 0x10, 0x00};


FrequentlyX wrote:

Code:
int PlayerBase = 0x20440CC;
int[] PlayerMultiLvl = new int[] { 0x14, 0x40, 0x10};
PlayerData PlayerOffsets = new PlayerData(0x4, 0xC, 0x8, 0x48);

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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