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 


Using table as struct

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

Joined: 22 Jun 2021
Posts: 233

PostPosted: Fri Jan 14, 2022 11:46 am    Post subject: Using table as struct Reply with quote

I have a problem whenever i've setting x = 0,memrec won't show value
_________________
void(*Haxing)(int Game)
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 5

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

PostPosted: Fri Jan 14, 2022 11:58 am    Post subject: Reply with quote

Going to need some more information. What code have you got? The value of the memory record isn't updating when?
Back to top
View user's profile Send private message
Frouk
Expert Cheater
Reputation: 1

Joined: 22 Jun 2021
Posts: 233

PostPosted: Fri Jan 14, 2022 11:59 am    Post subject: Reply with quote

Code:
Vector3D = {
x = 0,
y = 4,
z = 8
}

_________________
void(*Haxing)(int Game)
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 44

Joined: 24 Feb 2017
Posts: 912
Location: Pluto

PostPosted: Fri Jan 14, 2022 12:15 pm    Post subject: Reply with quote

You're not doing anything with a memory record or even the "memrec" variable. You're just making a global lua table. If you want to set a "memrec" value you need to do just that.
Code:
memrec.Value = 0

_________________
Back to top
View user's profile Send private message
Frouk
Expert Cheater
Reputation: 1

Joined: 22 Jun 2021
Posts: 233

PostPosted: Fri Jan 14, 2022 12:17 pm    Post subject: Reply with quote

Like with address not with value
Code:
0xAAB140+Vector3D.x

_________________
void(*Haxing)(int Game)
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 44

Joined: 24 Feb 2017
Posts: 912
Location: Pluto

PostPosted: Fri Jan 14, 2022 12:20 pm    Post subject: This post has 1 review(s) Reply with quote

Frouk wrote:
Like with address not with value
Code:
0xAAB140+Vector3D.x

Try setting the address to this.
Code:
AAB140+$Vector3D.x

_________________
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 5

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

PostPosted: Fri Jan 14, 2022 12:50 pm    Post subject: Reply with quote

Is it not true that memrec only pertains to the currently selected memoryrecord within the table? At least without telling Cheat Engine which memoryrecord to use?
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 44

Joined: 24 Feb 2017
Posts: 912
Location: Pluto

PostPosted: Fri Jan 14, 2022 1:30 pm    Post subject: Reply with quote

LeFiXER wrote:
Is it not true that memrec only pertains to the currently selected memoryrecord within the table? At least without telling Cheat Engine which memoryrecord to use?


You are correct, "memrec" is only available in a memory record script and is the memory record the script is a part of. I don't think they were actually doing anything with "memrec" they seemed to just use that as an abbreviation, but want to use a lua variable in the memory record's address. But with them being so vague it's hard to say, I'm really just making a guess as to what they are trying to do. It's mostly that I know "AAB140+Vector3D.x" as an address for a memory record won't work. So I'm guessing that's what they're talking about.

_________________
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater
Reputation: 5

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

PostPosted: Fri Jan 14, 2022 3:36 pm    Post subject: Reply with quote

TheyCallMeTim13 wrote:
You are correct, "memrec" is only available in a memory record script and is the memory record the script is a part of. I don't think they were actually doing anything with "memrec" they seemed to just use that as an abbreviation, but want to use a lua variable in the memory record's address. But with them being so vague it's hard to say, I'm really just making a guess as to what they are trying to do. It's mostly that I know "AAB140+Vector3D.x" as an address for a memory record won't work. So I'm guessing that's what they're talking about.


Thanks for the clarification. I completely understand where you're coming from with the little to no information provided in the request. I'm glad to be apart of a community that has members with a wealth of knowledge. I would +rep but CEF doesn't permit me to do so for apparently I have given you rep too soon already.
Back to top
View user's profile Send private message
Frouk
Expert Cheater
Reputation: 1

Joined: 22 Jun 2021
Posts: 233

PostPosted: Sat Jan 15, 2022 2:50 am    Post subject: Reply with quote

Everything work fine,thx
_________________
void(*Haxing)(int Game)
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