View previous topic :: View next topic |
Author |
Message |
Jesuszilla Newbie cheater
Reputation: 0
Joined: 29 Jul 2015 Posts: 11
|
Posted: Mon Sep 14, 2015 7:47 pm Post subject: onOpenProcess not being called? |
|
|
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 |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Sep 14, 2015 9:09 pm Post subject: |
|
|
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 |
|
 |
Jesuszilla Newbie cheater
Reputation: 0
Joined: 29 Jul 2015 Posts: 11
|
Posted: Mon Sep 14, 2015 9:14 pm Post subject: |
|
|
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 |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Sep 14, 2015 9:43 pm Post subject: |
|
|
Do you have the function defined before adding the process to the auto attach list?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Tue Sep 15, 2015 3:07 am Post subject: |
|
|
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 |
|
 |
|