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 


This instruction can't be compiled Tutorial Error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
unkn0wn1234
How do I cheat?
Reputation: 0

Joined: 26 Nov 2020
Posts: 5

PostPosted: Thu Nov 26, 2020 11:21 am    Post subject: This instruction can't be compiled Tutorial Error Reply with quote

So I'm trying a code injection, but whenever I write my instruction in newmem I get this error:
[Window Title]
Error

[Content]
Error in line 6 (00000000: add dword ptr [ebx+000004A4],02) :This instruction can't be compiled

[OK]

This is my script
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: add dword ptr [ebx+000004A4],02 //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
//sub dword ptr [ebx+000004A4],01

exit:
jmp returnhere

"Tutorial-i386.exe"+275E3:
jmp newmem
nop 2
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+275E3:
sub dword ptr [ebx+000004A4],01
//Alt: db 83 AB A4 04 00 00 01
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4718

PostPosted: Thu Nov 26, 2020 11:36 am    Post subject: Reply with quote

See where it says "place your code here"? You should place it there- not on the same line as the newmem label. CE AA isn't entirely whitespace insensitive.
Code:
newmem:
add [ebx+4a4],2

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
unkn0wn1234
How do I cheat?
Reputation: 0

Joined: 26 Nov 2020
Posts: 5

PostPosted: Thu Nov 26, 2020 11:48 am    Post subject: Reply with quote

ParkourPenguin wrote:
See where it says "place your code here"? You should place it there- not on the same line as the newmem label. CE AA isn't entirely whitespace insensitive.
Code:
newmem:
add [ebx+4a4],2

Oh I'm a dummy, thanks!
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