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 


Read variable memory problem?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Sat May 04, 2019 3:53 am    Post subject: Read variable memory problem? Reply with quote

Generally this is the case:
ReadInteger('[xxx.exe+A3DF]+10C')
 
I am prepared to do this:
Asd='xxx.exe+A3DF'
ReadInteger('[asd]+10C')

But then he will report an error, please help me, it is best to save the byte size
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 51

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sat May 04, 2019 6:43 am    Post subject: Reply with quote

First Lua variables are case sensitive. So "asd" and "Asd" are different variables.
But try it like this.
Code:
Asd = getAddress('[xxx.exe+A3DF]')
local bla = readInteger(Asd+0x10C)


That or use "registerSymbol". But I don't think this will work in the same script without time to let the symbols list update, so I tend to use the first example.
Code:
registerSymbol(mySymbol, 'xxx.exe+A3DF')
local bla = readInteger('[mySymbol]+10C')

https://wiki.cheatengine.org/index.php?title=Lua:registerSymbol


And I think this would work too, but I can't remember if it works in Lua scripts. CE will parse variables in the address list and in AA scripts if they have the "$" symbol in front of them.
Code:
Asd = 'xxx.exe+A3DF'
readInteger('[$Asd]+10C')

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