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 


Quick question about array in lua and ASM.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Thu Apr 21, 2016 11:30 pm    Post subject: Quick question about array in lua and ASM. Reply with quote

Is it possible to define an array in Lua, and then get the value of it in ASM?
For example:
In lua:
Code:

a = {}
a[1] = 10
a[2] = 20


then, in ASM, can I get the value of a[1] and a[2] by doing this?
Code:

cmp eax,$a[1]
....
cmp ebx,$a[2]


Thanks in advance.
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 Apr 23, 2016 3:37 am    Post subject: Reply with quote

Nope. Two different worlds. Lua tables are inside CE process memory, in asm you can access only opened process memory.

You have to use readInteger, writeInteger, readQword, writeQword, readBytes, writeBytes
readRegionFromFile, writeRegionToFile




The other option is to use openLuaServer command and luaclient DLL. (you have to inject luaclient dll to a process)

_________________
Back to top
View user's profile Send private message MSN Messenger
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Mon Apr 25, 2016 6:28 am    Post subject: Reply with quote

mgr.inz.Player wrote:
Nope. Two different worlds. Lua tables are inside CE process memory, in asm you can access only opened process memory.

You have to use readInteger, writeInteger, readQword, writeQword, readBytes, writeBytes
readRegionFromFile, writeRegionToFile




The other option is to use openLuaServer command and luaclient DLL. (you have to inject luaclient dll to a process)


Sorry for the late reply. I didn't expect someone would answer this after no one had answered it for a few days.
Thanks a lot. Smile
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