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 


please help to understand what's wrong - Not all instruction

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

Joined: 23 Aug 2017
Posts: 3

PostPosted: Tue Aug 11, 2020 4:37 am    Post subject: please help to understand what's wrong - Not all instruction Reply with quote

Hi,
I've recently seen few video guides "CE Tutorial x64" by TheyCallMeTim13 and decided to use that info in my cheats. I've googled a fresh table created by TheyCallMeTim13 for a different game - DyingLightGame.[v3.0.9].CT (can be easily found at fearlessrevolution). That table contains a lot of useful LUA and AA helper function/scripts I'm going to use in my table. For example - autoAttach to game process and getOpcodeAddress to simplify work with AOBScan.

So, the game I'm trying to cheat is called "Phoning Home". I've removed irrelevant content from DyingLightGame table (almost everything) and started to add required cheat content to my table - find a specific opcode, read the address opcode is accessing, update value at that address. Here's what I've got:
Code:
[ENABLE]
label(ptrFlyFuelUsage)
getOpcodeAddress(ptrFlyFuelUsage, 8B87xxxxxxxx8945CCD905, B)
registerSymbol(ptrFlyFuelUsage)

ptrFlyFuelUsage:
dd (float)14.0

[DISABLE]

ptrFlyFuelUsage:
dd (float)1400.0

unregisterSymbol(ptrFlyFuelUsage)

Now, when I activate the script the Cheat Engine returns error
Quote:
<<Not all instructions could be injected>>


I've found out that the problem is related to line with
Quote:
dd (float)14.0
.
Q1: Can someone explain me what's wrong with it? If I comment/remove that line the script will be executed successfully. Maybe something is missing?

Q2: Why the similar line inside [DISABLE] section is valid?

Thanks a lot!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Tue Aug 11, 2020 10:29 am    Post subject: Reply with quote

Try deleting "label(ptrFlyFuelUsage)"

If that doesn't work, something is wrong with getOpcodeAddress. I'd need to see its definition to tell you what exactly is wrong.

_________________
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
Zerg_Un
How do I cheat?
Reputation: 0

Joined: 23 Aug 2017
Posts: 3

PostPosted: Wed Aug 12, 2020 8:38 am    Post subject: Workaround found Reply with quote

ParkourPenguin,
Deleting line with label(...) causes "Not all code is injectable" error.

As a workaround I had to split the search of the address and memory modification in separate table rows:

#1:
Quote:
[ENABLE]
getOpcodeAddress(ptrFlyFuelUsage, 8B87xxxxxxxx8945CCD905, B)
registerSymbol(ptrFlyFuelUsage)

[DISABLE]
unregisterSymbol(ptrFlyFuelUsage)


#2 (child of #1, activated and deactivated with parent item):
Quote:
[ENABLE]
ptrFlyFuelUsage:
dd (float)14.0

[DISABLE]
ptrFlyFuelUsage:
dd (float)1400.0


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