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 


Pointer variable assignments

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

Joined: 08 Feb 2016
Posts: 2
Location: US

PostPosted: Sat Jul 28, 2018 8:40 am    Post subject: Pointer variable assignments Reply with quote

Maybe I'm overthinking something (usually do 8^D)
Is there a way to "assign" a pointer value to a label, and then reference it later?

Example, This is the way I "assign" a fixed value to BasePTR1, like this:
BasePtr = 00400000 (4 Byte Integer)

Later, I want to reference it by the label, like this:
Ptr1 = ptr(BasePTR + $6000) + $68C

My question is this, can I now reference PTR1 by it's label?
PTR2 = ptr(PTR1 + $274) + $20C

or do I have to do it the old way, like this?
PTR2 = ptr(ptr(BasePtr + $6000) + $274) +$20C

Is this possible?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Jul 28, 2018 10:16 am    Post subject: Reply with quote

maybe use define? eg.
define(BasePTR, 400000)

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1587

PostPosted: Sat Jul 28, 2018 12:01 pm    Post subject: Reply with quote

pointers:
Code:
mov ebx,label_name

Code:
code:
... ; some code

name:
dd code // value of [name] equal to the address of code: label
// note use dq for 64-bit addresses


constants:
Code:
define(base,$00400000)

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
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