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 


Need help with MemoryRecord and Array of Bytes

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

Joined: 27 Jul 2013
Posts: 2

PostPosted: Sat Jul 27, 2013 1:23 pm    Post subject: Need help with MemoryRecord and Array of Bytes Reply with quote

Greetings. First time poster here.

I am currently playing around with Cheat Engine and its LUA support and have just a couple of probably noobish questions (still trying to get my head around this language)

Currently I'm trying to populate my table through a lua script. I can get the correct address so for now that is not an issue, but I fail to add certain things from inside the script.

Assume that mymemoryrecord is correctly pointing to a Cheat Table entry.
The first on is just a minor thing: I can't seem to create the equivalent of "Right Click->Create Header", a memoryrecord that would simply serve as a header with no address or any other data.
Tried several things, mymemoryrecord.Type seems to not be the answer as both a normal single Byte memoryrecord and a manually created header have Type set as 0 (vtByte).

The second one is a bit bigger. I am trying to create an entry that will hold an Array of Bytes. I succesfully managed to create that entry, and it was correctly updated to the correct address and Type, the problem is the size, it's always 0. I can't find out how to change it from inside the script. According to main.lua
Code:
If the type is vtByteArray then the following propertes are available
      Aob.Size : Number of bytes

but I do not understand this. mymemoryrecord.Aob does not exist and neither does mymemoryrecord.Size or mymemoryrecord.Length. I also checked mymemoryrecord.Options but it's empty.

Cheers for your time.
Oh, and I'm currently using Cheat Engine 6.3.
Back to top
View user's profile Send private message  
Dark Byte
Site Admin
Reputation: 468

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

PostPosted: Sat Jul 27, 2013 2:04 pm    Post subject: Reply with quote

It's undocumented, but you can do this to make an entry a groupheader:
Code:

mymemoryrecord.IsGroupHeader=true


for the aob.Size thing it looks like that's a bug
Luckily, you can use the fallback routine memoryrecord_aob_setSize(mr, size)

e.g:
Code:

memoryrecord_aob_setSize(mymemoryrecord, 25)

_________________
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 
ICQ Number
XiewRikl
How do I cheat?
Reputation: 0

Joined: 27 Jul 2013
Posts: 2

PostPosted: Sat Jul 27, 2013 2:13 pm    Post subject: Reply with quote

Cheers !

That's exactly what I was looking for.
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