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 


Structure information

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

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Wed Aug 04, 2021 1:55 pm    Post subject: Structure information Reply with quote

I founded out that i can use structures like this
Code:
CVector3D = {
X = '+0x0'
Y = '+0x4'
Z = '+0x8'
}

I can't use X
In address list it's just gives only non-usable address

EDIT:
Maybe i will create function that can do like this
Code:

X,Y,Z = CVector3D

Or Cheat Engine can do that?
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: Wed Aug 04, 2021 2:35 pm    Post subject: Reply with quote

Code:

CVector3D = { }


This is a table (array). You access it like CVector3D[index]; however, you can assign a key and value to the table like so

Code:

CVector3D = { 'X' = 0x0, 'Y' = 0x4, 'Z' = 0x8 }


Then you can access it in a way like this:
Code:

local pX = CVector['X']
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Wed Aug 04, 2021 4:22 pm    Post subject: Reply with quote

You were missing some commas, tables use commas to separate things. And you can access this as shown.
Code:

CVector3D = {
X = '+0x0',
Y = '+0x4',
Z = '+0x8',
}
print(CVector3D.X)
print(CVector3D['X'])

_________________
Back to top
View user's profile Send private message Visit poster's website
Frouk
Master Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Wed Aug 04, 2021 11:17 pm    Post subject: Reply with quote

thx
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