| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| mindoff Advanced Cheater
 
 ![]() Reputation: 0 
 Joined: 12 Jun 2016
 Posts: 96
 
 
 | 
			
				|  Posted: Sun Jul 02, 2017 11:39 pm    Post subject: ASM and LUA run different in Cheat Table?? |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Mon Jul 03, 2017 4:19 am    Post subject: |   |  
				| 
 |  
				| {$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 |  | 
	
		|  | 
	
		| mindoff Advanced Cheater
 
 ![]() Reputation: 0 
 Joined: 12 Jun 2016
 Posts: 96
 
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |