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 


onOpenProcess not being called?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Jesuszilla
Newbie cheater
Reputation: 0

Joined: 29 Jul 2015
Posts: 11

PostPosted: Mon Sep 14, 2015 7:47 pm    Post subject: onOpenProcess not being called? Reply with quote

I have a user who is running one of my scripts. onOpenProcess is not being called at all for him.

Code:
-- Select the correct bases based on the process that was attached
function onOpenProcess(processid)
    print("THAT'S THE SOUND OF THE POLICE")
    -- Kawaks hitbox base
    if getProcessIDFromProcessName("WinKawaks.exe") == processid then
        print("N00T N00T")
        game.base = readInteger(emuBase.kawaks)
        base = readInteger(boxBase.kawaks)
    -- MAME-rr hitbox base
    elseif getProcessIDFromProcessName("mame.exe") == processid or getProcessIDFromProcessName("mame-rr.exe") == processid then
        game.base = readInteger(emuBase.mamerr)
        base = readInteger(boxBase.mamerr)
    -- DEmul hitbox base
    elseif getProcessIDFromProcessName("demul.exe") == processid then
        game.base = readInteger(emuBase.demul)
        base = readInteger(boxBase.demul)
    end
    --print(string.format("base = 0x%X", base))
end



The first two print statements in the onOpenProcess are not executing for him after selecting "Yes" to run the Lua script; however the process DOES get auto-attached to WinKawaks.exe as I defined earlier in the script:
Code:
aalist = getAutoAttachList()
stringlist_add(aalist,"WinKawaks.exe");
stringlist_add(aalist,"demul.exe");


The statements also execute for me just fine. They also execute if he manually runs the script by clicking "Execute Script" in the Lua script window brought up by Ctrl+Alt+L.


Are there any possible configuration settings that could cause this to happen?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Sep 14, 2015 9:09 pm    Post subject: Reply with quote

Edit > Settings
General Settings
[x] Always run lua scripts from tables

Just to be safe:
[x] Ask to run lua scripts from tables
Back to top
View user's profile Send private message
Jesuszilla
Newbie cheater
Reputation: 0

Joined: 29 Jul 2015
Posts: 11

PostPosted: Mon Sep 14, 2015 9:14 pm    Post subject: Reply with quote

The thing is, though, it does ask him to run the script, and the script does run, or else it wouldn't auto-attach. The problem is onOpenProcess is not called when the attach is complete.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Sep 14, 2015 9:43 pm    Post subject: Reply with quote

Do you have the function defined before adding the process to the auto attach list?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Sep 15, 2015 3:07 am    Post subject: Reply with quote

Tell him to NOT open any process before loading the script.
Perhaps he first opens the game and then loads the script

_________________
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
View user's profile Send private message MSN Messenger
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