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 


[Help] How to create, copy, delete Memory Record Childs?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
sir-gunny
Advanced Cheater
Reputation: 0

Joined: 15 Mar 2012
Posts: 80

PostPosted: Thu Jan 16, 2020 3:28 am    Post subject: [Help] How to create, copy, delete Memory Record Childs? Reply with quote

Hi.

I need help to create Childs. I test a lot but notthik works. Can anyone help me?

al=getAddressList()
mr = al.createMemoryRecord()
mr.Description = "My Test MemRec"

Create child??
I don't know how. Need help

Copy with all properties??
mr2 = al.createMemoryRecord()
mr2 = mr
mr2.Child[0] = mr.Child[0]
Dose it works?

Destroy???
mr.destroy()???
Delete it the complete record with all childs?

mr.Child[0].destroy()???
Delete it the complete Child with all "subchilds" (mr.Child[0].Child[n]...)?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Thu Jan 16, 2020 5:45 am    Post subject: Reply with quote

Just an example:

Code:
-- creating fisrt record (base address)
local baseAddress = '000F6AF0'  -- assuming has base address

al=getAddressList()
mr = al.createMemoryRecord()  -- base address
mr.setAddress(baseAddress)
mr.Description = "My Test MemRec"
-- mr.Type = vtByte
-- etc

-- creating child
local child1 = al.createMemoryRecord()
child1.setAddress('0010ABF8')
child1.setDescription('Child 1 of My Test MemRec')
child1.appendToEntry(mr)

-- creating second child
local child2 = al.createMemoryRecord()
child2.setAddress('00990244')
child2.setDescription('Child 2 of My Test MemRec')
child2.appendToEntry(mr)

-- delete child 1
memoryrecord_delete(child1)


To delete all memory record created (from somewhere on this forum):

Code:
function removeAllCreatedMemoryRecords()
  for _,v in pairs(IDsOfCreatedMR) do
    local mr = addresslist_getMemoryRecordByID(al,v)
    if mr~=nil then memoryrecord_delete(mr) end
  end
end   


I don't know how to copy an memrec.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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