Cheat Engine Forum Index
Cheat EngineThe Official Site of Cheat Engine
| View previous topic :: View next topic |
| Author |
Message |
kuukuuu How do I cheat? Reputation: 0
Joined: 19 Sep 2025 Posts: 7
|
Post Posted: Fri Sep 19, 2025 7:22 am Post subject: On using instruction:find() to search for 'break and track'
Reply with quote
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?
Smile
|
| Back to top |
|
Dark Byte Site Admin Reputation: 471
Joined: 09 May 2003 Posts: 25816 Location: The netherlands
|
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
|
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) Embarassed
|
| Back to top |
|
Dark Byte Site Admin Reputation: 471
Joined: 09 May 2003 Posts: 25816 Location: The netherlands
|
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
|
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] . Confused
PixPin_2025年09月20日_20-40-21.png
|
| Filesize: |
310.01 KB |
| Viewed: |
1894 Time(s) |
PixPin_2025年09月20日_20-40-21.png
|
| Back to top |
|
ParkourPenguin I post too much Reputation: 152
Joined: 06 Jul 2014 Posts: 4711
|
`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
|
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
Code:
mov ecx,[00EE59A0]
that have [] as their source operand.
Is there no such trouble in your Cheat Engine? Maybe it's just my personal computer environment problem. Embarassed
| Back to top |
|
Dark Byte Site Admin Reputation: 471
Joined: 09 May 2003 Posts: 25816 Location: The netherlands
|
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
|
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! Very Happy
| Back to top |
|
|
|
Page 1 of 1
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