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 


AOB error when cheat engine is closed then reopened

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
themandem
Cheater
Reputation: 0

Joined: 06 Dec 2019
Posts: 41

PostPosted: Tue Jun 14, 2022 1:56 pm    Post subject: AOB error when cheat engine is closed then reopened Reply with quote

if i forget to deactivate my scripts before closing cheat engine, then open cheat engine again and try to activate those same scripts again, they won't. They give AOB error because the bytes changed or something. And then the only way to activate my scripts again would be to restart the game/process. Is there any workaround for this so i don't have to go through all that?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1538

PostPosted: Tue Jun 14, 2022 2:08 pm    Post subject: Re: AOB error when cheat engine is closed then reopened Reply with quote

A) You can restart the game.

B) You can assign a command that brings all the codes to their original position and activate it when the process is selected.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
themandem
Cheater
Reputation: 0

Joined: 06 Dec 2019
Posts: 41

PostPosted: Tue Jun 14, 2022 2:42 pm    Post subject: Re: AOB error when cheat engine is closed then reopened Reply with quote

AylinCE wrote:
A) You can restart the game.

B) You can assign a command that brings all the codes to their original position and activate it when the process is selected.


Modern AAA games take too long to load. ain't nobody got time for that.
how would you script something like B? could you help me
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4724

PostPosted: Tue Jun 14, 2022 4:23 pm    Post subject: Reply with quote

The easiest solution is to not close CE.

If you can't do that, automatically disable the scripts when you close the main form. (haven't tested this)
Code:
if closeCallback then MainForm.unregisterCloseCallback(closeCallback); closeCallback = nil end

closeCallback = MainForm.registerCloseCallback(function(f, closeaction)
  if closeaction == caFree then
    -- disable scripts
    AddressList.getMemoryRecordByDescription'my script'.Active = false
  end
  return closeaction
end)

And if you must leave the scripts enabled, you'll need to leave a magic identifier in your code injections to find them in the next CE instance. Manually disable them by reading the destination of the return jump, overwriting the injection point with the original bytes (these can be stored as part of the magic identifier), and freeing the memory of the injection. This would probably be a fair bit of work for each script.

_________________
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
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