View previous topic :: View next topic |
Author |
Message |
Tachyon How do I cheat? Reputation: 0
Joined: 08 Aug 2017 Posts: 4
|
Posted: Tue Aug 08, 2017 3:49 pm Post subject: Error getAddress in compiled EXE trainer |
|
|
Hello. I have code that works well in the Cheat Engine .CT. But the problem is that the right address is not determined immediately after the start of the game. If the exe is compiled, then the program will produce an error "failure determining what means" for a few seconds. Then it stops, with the message "Stack overflow". ErrorOnLookupFailure (false) does not solve the problem, the program still stops. Pcall I also tried.
This error does not appear if the trainer is started after the game starts. But I wanted to ask if it is possible to make the process monitor work correctly.
Code: |
RunProcess = 0
BaseOffset = 0
StringOffset = "[Game.exe+2A82E0]"
function ProcessMonitor()
if (getProcessIDFromProcessName("Game.exe") == nil) then
if (RunProcess == 1) then
RunProcess = 0
BaseOffset = 0
end
else
if (RunProcess == 0) then
RunProcess = 1
OpenProcess("Game.exe")
end
BaseOffset = getAddress(StringOffset)
end
end
RunTimer = createTimer(nil)
timer_setInterval(RunTimer, 100)
timer_onTimer(RunTimer, ProcessMonitor)
timer_setEnabled(RunTimer, true)
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Aug 08, 2017 4:14 pm Post subject: |
|
|
add a timer of 20 to 30 seconds to your trainer after opening the process.
then in the timer first call reinitializeSymbolhandler(true) and then your normal code
and use getAddressSafe
_________________
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 |
|
|
Tachyon How do I cheat? Reputation: 0
Joined: 08 Aug 2017 Posts: 4
|
Posted: Tue Aug 08, 2017 4:49 pm Post subject: |
|
|
After using getAddressSafe, the error "attempt to call a nil value" appears.
20 sec pause - solution does not fit.
I tried to print the address to the Cheat Engine table and take it from there using the command
BaseOffset = addresslist.getMemoryRecordByID(33).Value
or
BaseOffset = tonumber(addresslist.getMemoryRecordByID(33).Value)
Again, everything works well in .CT, but there was an error in exe.
After the reinitializeSymbolhandler (true) was added, this option worked in exe too. Thank you. However, I still do not understand why the problem with getAddress.
UPD: but with this option exe loses memory. After one minute of work, the trainer process takes 3 GB of memory. And it stops with the error "Thread creation error" and "Stack overflow".
PS: Yes, for sure, the memory leak is due to reinitializeSymbolhandler (true). I checked by removing it.
|
|
Back to top |
|
|
|