| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| kuukuuu How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Sep 2025
 Posts: 7
 
 
 | 
			
				|  Posted: Fri Sep 19, 2025 7:22 am    Post subject: On using instruction:find() to search for 'break and track' |   |  
				| 
 |  
				| I found a strange problem, I can't use instruction:find() to search for instructions that use [] addressing as source operands, such as: 
 mov eax,[esp+14]
 call dword ptr[eax*8+005DD374]
 jmp dword ptr[ebx*4+4CEE6C]
 
 Even if I use:
 
 instruction:find('.')~=nil
 
 I can't make this kind of instruction highlight.
 other instructions like:
 
 mov [esp+20],eax
 
 and others are fine.
 But using a register value as a search criterion, like EBX == 0x0, can highlight all instructions.
 emmm...Is this a bug?
 
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Sat Sep 20, 2025 12:42 am    Post subject: |   |  
				| 
 |  
				| as you mentioned in your previous post: you should have spend the time looking into lua 
 [ is a special in lua.  You need to add a % in front of them so %[
 _________________
 
 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 |  | 
	
		|  | 
	
		| kuukuuu How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Sep 2025
 Posts: 7
 
 
 | 
			
				|  Posted: Sat Sep 20, 2025 3:10 am    Post subject: |   |  
				| 
 |  
				| I did catch up on a little LUA,So I also tried instruction:find('%[')~=nil However, it can only highlight instructions like mov [esi+00d27714],edi , while  mov edi,[esi+00d27714] cannot be highlighted.
 Is there a bug with the Cheat Engine version I downloaded?(Not the official version,I won't compile from source)
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Sat Sep 20, 2025 5:54 am    Post subject: |   |  
				| 
 |  
				| try 
  	  | Code: |  	  | instruction:find('[',true)~=nil
 
 | 
 _________________
 
 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 |  | 
	
		|  | 
	
		| kuukuuu How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Sep 2025
 Posts: 7
 
 
 | 
			
				|  Posted: Sat Sep 20, 2025 6:47 am    Post subject: |   |  
				| 
 |  
				| It still doesn't work, it will pop up the lua engine window with a lot of 【error:[string ".."]:4: bad argument #2 to 'find" (number expected, got boolean)】output 
 I downloaded an English version of CE 7.4, but this is still the case
 
 
 Maybe the Cheat Engine version I'm using is too old... I tried to replace true with 1, but the lua engine still outputs the error messages
 Error:[string "..."]:4: malformed pattern (missing ']').
 
 I also tried the condition
 instruction:find('%[',1)~=nil
 so that the lua engine would not give an error, but i'm back to the old situation , where I can only highlight  mov [esi+00d27714],edi  and not highlight  mov edi,[esi+00d27714] .
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ParkourPenguin I post too much
 
  Reputation: 152 
 Joined: 06 Jul 2014
 Posts: 4706
 
 
 | 
			
				|  Posted: Sat Sep 20, 2025 10:09 am    Post subject: |   |  
				| 
 |  
				| `plain` is the fourth parameter to string.find. Third if you use `:` 
  	  | Code: |  	  | instruction:find('[', nil, true) | 
 
 In the picture, is there a space in the pattern? I can't tell because of the font.
 _________________
 
 I don't know where I'm going, but I'll figure it out when I get there. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kuukuuu How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Sep 2025
 Posts: 7
 
 
 | 
			
				|  Posted: Sat Sep 20, 2025 2:38 pm    Post subject: |   |  
				| 
 |  
				|  	  | ParkourPenguin wrote: |  	  | `plain` is the fourth parameter to string.find. Third if you use `:` 
  	  | Code: |  	  | instruction:find('[', nil, true) | 
 
 In the picture, is there a space in the pattern? I can't tell because of the font.
 | 
 
 If I use search condition
 
  	  | Code: |  	  | instruction:find('[', nil, true)~=nil | 
 The search works, but the previous problem remains unsolved and is still not useful for instructions like
 
 that have [] as their source operand.
 
 Is there no such trouble in your Cheat Engine? Maybe it's just my personal computer environment problem.
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Sat Sep 20, 2025 3:31 pm    Post subject: |   |  
				| 
 |  
				| no problem in mine, and technically there should be no reason at all for that 
 open lua engine : ctrl+alt+L anywhere in CE, and paste in
 
  	  | Code: |  	  | s='mov ecx,[00EE59A0]'
 return s:find('[',nil,true)~=nil
 
 | 
 it should return true
 _________________
 
 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 |  | 
	
		|  | 
	
		| kuukuuu How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 19 Sep 2025
 Posts: 7
 
 
 | 
			
				|  Posted: Sat Sep 20, 2025 4:56 pm    Post subject: |   |  
				| 
 |  
				|  	  | Dark Byte wrote: |  	  | no problem in mine, and technically there should be no reason at all for that 
 open lua engine : ctrl+alt+L anywhere in CE, and paste in
 
  	  | Code: |  	  | s='mov ecx,[00EE59A0]'
 return s:find('[',nil,true)~=nil
 
 | 
 it should return true
 | 
 
 Yes, when I run this code in the lua engine, the output is:
 
  	  | Code: |  	  | s='mov ecx,[00EE59A0]' return s:find('[',nil,true)~=nil
 
 1:true
 | 
 
 Oh! No more problems! After some try I managed to install the latest version and now I can normally highlight instructions like mov ecx,[00EE59A0]!
 
 Thank you for your help!
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |