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 


Change address not value in memory record.

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

Joined: 10 Nov 2016
Posts: 84
Location: Another World - N5X2 106311411+2123518

PostPosted: Mon Aug 23, 2021 9:15 am    Post subject: Change address not value in memory record. Reply with quote

Hello all, i cant seem to find out how to do this.

Say i have random memory record with a random address.
How to change the address (not the value) with a Lua script.

Have tried a few things but no luck, any ideas ?

Code:
add=getAddressList().getMemoryRecordByDescription('health').address
newadd=2146977057
if add then writeInteger(add, newadd)
end
--This as you know puts the newadd address into the value of the add address.
--how to put newadd address into the add address.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1053
Location: 0x90

PostPosted: Mon Aug 23, 2021 9:54 am    Post subject: Reply with quote

Code:

memoryrecord.setAddress(new_address)


Note, pass the address in hexadecimal notation e.g. 0xDEADBEEF
Back to top
View user's profile Send private message
Flux.
Advanced Cheater
Reputation: 0

Joined: 10 Nov 2016
Posts: 84
Location: Another World - N5X2 106311411+2123518

PostPosted: Mon Aug 23, 2021 11:25 am    Post subject: Reply with quote

Thank you LeFiXER works great.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1053
Location: 0x90

PostPosted: Mon Aug 23, 2021 11:26 am    Post subject: Reply with quote

You're welcome Smile thank you for taking the time to say thanks Very Happy
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