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 


Lua and Pointers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
TechnoJacker
Master Cheater
Reputation: 27

Joined: 02 Sep 2012
Posts: 300
Location: Steam: Slynderdale

PostPosted: Sat Oct 13, 2012 8:19 am    Post subject: Lua and Pointers Reply with quote

I am novice when it comes to programming so I quickly picked up Lua script. My only problem is accessing data using pointers.

I have this pointer:
Code:

      <Description>"Pos X"</Description>
      <VariableType>Float</VariableType>
      <Address>[pBasePointer]</Address>
      <Offsets>
        <Offset>60</Offset>
        <Offset>A4</Offset>
        <Offset>30</Offset>
      </Offsets>


Which as an example currently points to:
Code:
pBasepointer = 13bb0818
30 = 3a948218
a4 = 3be50020
60 = 3be50080


Yet when I try to use Lua script with the same address and offsets above, I get a completely different address.

I tried doing:
readFloat("[[[pBasePointer]+30]+A4]+60")

And got a completely different address and value. What am I doing wrong?
Back to top
View user's profile Send private message
Zadkos
How do I cheat?
Reputation: 0

Joined: 20 Mar 2010
Posts: 9

PostPosted: Sat Oct 27, 2012 5:21 pm    Post subject: Extra "[]" Reply with quote

I think that this should work:
readFloat("[[[[pBasePointer]]+30]+A4]+60")

To access the "registersymbol" pBasePointer you need an extra pair of "[]". Hope that helps.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Oct 27, 2012 5:45 pm    Post subject: Reply with quote

above - I agree.
_________________
Back to top
View user's profile Send private message MSN Messenger
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