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 


MemoryRecord get String

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

Joined: 05 Jan 2016
Posts: 61
Location: Germany

PostPosted: Fri Jul 01, 2016 1:56 pm    Post subject: MemoryRecord get String Reply with quote

Hey!

I know how to get the value of a memory record:
Code:
getAddressList().getMemoryRecordByDescription("Value").Value

But how do you do it, if you want to get a string instead of a value?
And where in the Main.lua can I read something about it? I searched for MemoryRecord but I didnt find what I am searching for.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4290

PostPosted: Fri Jul 01, 2016 2:23 pm    Post subject: Reply with quote

A string is a type of value. If you can't get it, providing more information may help.

If you want to read a string w/o using a memory record, use readString(address).

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Fri Jul 01, 2016 2:38 pm    Post subject: Reply with quote

You may check if the mr point to a readable memory by checking:
Code:
if readBytes(mr.CurrentAddress)~=nil then -- readable address

For Type String or Array of Bytes that with a Length/Size, the Value may still be '??' if the memory range (mr.CurrentAddress to + some size ) cross a memory boundary with a unreadable one.

bye~

_________________
- Retarded.
Back to top
View user's profile Send private message
TPRammus
Advanced Cheater
Reputation: 0

Joined: 05 Jan 2016
Posts: 61
Location: Germany

PostPosted: Fri Jul 01, 2016 6:18 pm    Post subject: Reply with quote

I know what went wrong now. I just forgot to rename the entry to 'TextToWrite.' (or with my example 'Value') ._.
Thank you!
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