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 


In CE Lua, how to get module base address?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sun Jun 11, 2017 12:46 am    Post subject: In CE Lua, how to get module base address? Reply with quote

It seems getAddress("game.exe") does not work, and it causes an error message:
"Error: Failuer determining what game.exe means."

The funny thing is if I open CE and use "getAddress("game.exe")", it can work. However, if I make the standalone trainer, it will not allow the trainer to open, and shows the error message.....

Edit:
Interestingly, this game starts with "game.exe+2"........no wonder why..

_________________
**************

A simple example is better then ten links. Very Happy


Last edited by Dr.Disrespect on Sun Jun 11, 2017 3:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Sun Jun 11, 2017 1:14 pm    Post subject: Reply with quote

How are you using this code in your Lua script? Would need to see the full code to tell what the issue may be. Generally though, this is usually caused by the symbols not being ready for use when you try to use them. You can usually fix that by force finishing the open process event like this:

Code:
function onOpenProcess(procid)
    -- Force the open process to complete..
    reinitializeSymbolhandler();
end


This can slow down your trainers startup and initialization though, so keep that in mind if you notice it loads slower with this.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sun Jun 11, 2017 3:28 pm    Post subject: Reply with quote

atom0s wrote:
How are you using this code in your Lua script? Would need to see the full code to tell what the issue may be. Generally though, this is usually caused by the symbols not being ready for use when you try to use them. You can usually fix that by force finishing the open process event like this:

Code:
function onOpenProcess(procid)
    -- Force the open process to complete..
    reinitializeSymbolhandler();
end


This can slow down your trainers startup and initialization though, so keep that in mind if you notice it loads slower with this.


Sorry atom0s, I fixed the problem yesterday and forgot to update the post.

You are 100% right, the symbol is not ready for use when the trainer is starting up. I delay the event time to fix it, but your method is better. Thanks.

_________________
**************

A simple example is better then ten links. Very Happy
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 Lua Scripting 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