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 


Cannot extract pointer offsets from any address

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

Joined: 20 Dec 2015
Posts: 2

PostPosted: Sun Dec 20, 2015 7:05 am    Post subject: Cannot extract pointer offsets from any address Reply with quote

Hello.

I have run into a problem. For the last hour I've been trying to print out an address with pointer offsets using
Code:
local addressEdited = getAddressList().getMemoryRecord(record);
print(addressEdited.getAddress());


All I'm getting is "SuperMeatBoy.exe+2D54BC ", without offsets or anything.

I've tried getting the offsets using [1] but the output type is a string, not a table.
I've also tried using memoryrecord_getAddress(addressEdited). It returns the final address(dec) without any offsets or the base address.

What should I do? Any advice is appreciated.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Sun Dec 20, 2015 8:21 am    Post subject: Re: Cannot extract pointer offsets from any address Reply with quote

Luading wrote:
Hello.

I have run into a problem. For the last hour I've been trying to print out an address with pointer offsets using
Code:
local addressEdited = getAddressList().getMemoryRecord(record);
print(addressEdited.getAddress());


All I'm getting is "SuperMeatBoy.exe+2D54BC ", without offsets or anything.

I've tried getting the offsets using [1] but the output type is a string, not a table.
I've also tried using memoryrecord_getAddress(addressEdited). It returns the final address(dec) without any offsets or the base address.

What should I do? Any advice is appreciated.



In main.lua at ce directory, Memory Record Class:
Code:
  Address: string - Get/set the interpretable address string. Useful for simple address settings.
  OffsetCount: integer - The number of offsets. Set to 0 for a normal address
  Offset[] : integer - Array to access each offset
  CurrentAddress: integer - The address the memoryrecord points to


CurrentAddress should be the resulted Address.

Address is clever enough if setting to a Integer value, it will convert accordingly.
However, setting Address to a address string like '[[[ABC.exe+123]+8]+7]' will not convert it to 'MultiLevel-Pointer-Type' automatically.
The OffsetCount & Offset array is there for 'MultiLevel-Pointer-Type'.

To set 'MultiLevel-Pointer-Type' address, either enter it from the address UI with the 'pointer' checkbox clicked.
Or in Lua,
set Address 1st as base of 'MultiLevel-Pointer-Type' .
set the OffsetCount to the level / number of offset, if it is larger than 0, it is will be 'MultiLevel-Pointer-Type' ,
then set each offsets. eg.
Code:
local addressEdited = getAddressList().getMemoryRecord(record);
addressEdited.Address='ABC.exe+123'
addressEdited.OffsetCount = 2
addressEdited.Offset[0]=7
addressEdited.Offset[1]=8


Offset with index 0 is the last of address string, or topmost of address UI at pointer mode.

If later Address is set, even the exact same number, the 'MultiLevel-Pointer-Type' will be cleared, OffsetCount reset to 0.

_________________
- Retarded.
Back to top
View user's profile Send private message
Luading
How do I cheat?
Reputation: 0

Joined: 20 Dec 2015
Posts: 2

PostPosted: Sun Dec 20, 2015 8:33 am    Post subject: Reply with quote

Wow, didn't think about that. It works and it's easier than I've imagined.

Thank you very much, kind sir.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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