View previous topic :: View next topic |
Author |
Message |
wulfcare Advanced Cheater Reputation: 0
Joined: 27 Feb 2023 Posts: 59
|
Posted: Fri Apr 21, 2023 5:54 pm Post subject: Logging when calling game functions LUA |
|
|
Hey guys,
I like to use lua to call game functions so I don't have load up visual studio each time. But I was wondering how I would be able to find out which argument causes crashes when I am experimenting with these functions. Is using a print() statement after each argument in executeCodeEx the best way? Any tips would be greatly appreciated.
local gameFunction= 'myGame.exe+84200'
local RCX = readPointer('myGame.exe+0x6610')
local RDX = 0x7
local R8 = 0xEC375FF0F0
local R9 = 0x1F9A5AF5770
local arg5 = 0x616
executeCodeEx(0, nil, gameFunction,
{0, RCX},
{0, RDX},
{0, R8},
{0, R9},
{0, arg5}
)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Sat Apr 22, 2023 4:44 am Post subject: |
|
|
after executeCodeEx have this code:
Code: |
if readInteger(gameFunction)==nil then
print("It crashed")
end
|
and perhaps add some information about the given parameters
_________________
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 |
|
|
wulfcare Advanced Cheater Reputation: 0
Joined: 27 Feb 2023 Posts: 59
|
Posted: Wed Apr 26, 2023 2:55 am Post subject: |
|
|
Is it possible to know exactly which argument caused the function to crash?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Wed Apr 26, 2023 8:09 am Post subject: |
|
|
attach debugger and set it to break on unexpected exceptions
then when it crashes it should break at the instruction that causes the crash.
now just figure out why
_________________
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 |
|
|
wulfcare Advanced Cheater Reputation: 0
Joined: 27 Feb 2023 Posts: 59
|
Posted: Wed Apr 26, 2023 4:12 pm Post subject: |
|
|
I have Break on unexpected exceptions set to always. The problem is when I set a breakpoint on the function and try and call the function using lua in cheat engine the game seems to lock up and then they both crash together.
If i just call the function from lua and I don't have a breakpoint set on the function only the game will crash.
Because they both crash when the breakpoint is set on the function when i try to call it I am unable to debug anything.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Thu Apr 27, 2023 2:31 am Post subject: |
|
|
use 2 ce instances. one that attaches the debugger and breaks on unexpected bp's and the other one executes the code
_________________
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 |
|
|
|