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 


Get value from game function

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

Joined: 22 Jun 2021
Posts: 512

PostPosted: Mon Feb 21, 2022 12:55 pm    Post subject: Get value from game function Reply with quote

how to get value from game function and register variable in lua?
Back to top
View user's profile Send private message  
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

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

PostPosted: Mon Feb 21, 2022 1:53 pm    Post subject: Reply with quote

For example:
Code:

{$luacode test=rcx}
  local value = test
  print(tostring(test))
{$asm}
Back to top
View user's profile Send private message  
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 512

PostPosted: Mon Feb 21, 2022 2:21 pm    Post subject: Reply with quote

LeFiXER wrote:
For example:
Code:

{$luacode test=rcx}
  local value = test
  print(tostring(test))
{$asm}


so i need to get register that returned by calling and paste this code?
Back to top
View user's profile Send private message  
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

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

PostPosted: Mon Feb 21, 2022 7:03 pm    Post subject: This post has 1 review(s) Reply with quote

Well, not paste directly. You can set whichever registers hold the data you want to use then you can use Lua to do what you want.
Back to top
View user's profile Send private message  
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 512

PostPosted: Mon Feb 21, 2022 11:23 pm    Post subject: Reply with quote

LeFiXER wrote:
Well, not paste directly. You can set whichever registers hold the data you want to use then you can use Lua to do what you want.

ty
Back to top
View user's profile Send private message  
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

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

PostPosted: Tue Feb 22, 2022 6:25 am    Post subject: Reply with quote

The wiki/luacode page will provide more insight.
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 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