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 


ASM and LUA run different in Cheat Table??

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Sun Jul 02, 2017 11:39 pm    Post subject: ASM and LUA run different in Cheat Table?? Reply with quote

Don't know why they run separately,not what I want.

some code like below in my Cheat Table

I want to run a button check from both lua and asm
after do my custom control

only asm update correctly when I pressing the right key,lua part not.
lua update only once from the enable run.

how can I keep updating data with lua just like asm does?

I need lua to do some vector3d calucation with camera contrl,
I think it's much easier to write vector calucation with lua than asm.
The only problem is why they have different result?
Does lua run with a Timer of something asynchronously?

Code:

cmp eax,0
je notPressedButton
//do my custom control

{$lua}
local addrX = 0x4833BCCC
local x = readFloat(addrX)
x = x+1
writeFloat(addrX, x)

{$asm}

mov ebx, [aa.exe+0e10]
add ebx, 1
mov [aa.exe+0e10], ebx
jmp endNow


notPressedButton:
...
endNow:
...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Mon Jul 03, 2017 4:19 am    Post subject: Reply with quote

{$lua} sections get executed first and their result is then pasted into the AA script
the aa script then assembles that as part of the whole script.

In short: lua blocks do not execute code after execution

try a timer, or a lua callback

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Mon Jul 03, 2017 5:36 am    Post subject: Reply with quote

OK try to get things working

http://forum.cheatengine.org/viewtopic.php?p=5650496
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