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 


Why does this happen when I use the setbreakpoint code?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Sun Sep 27, 2015 7:04 am    Post subject: Why does this happen when I use the setbreakpoint code? Reply with quote

Let's say I have a trainer with two buttons, one makes your player fly in the game, other one makes you able to walk through walls.. Now, let's say I wanted to do both at once, I would just click them both.. right? but hey, once I click both of them the game just completely crashes/stops responding, this does not happen if I set the breakpoints manually on the two addresses... it only occurs w/the lua code.. Any suggestions/help on how I can fix this? I want to be able to use all my features at once through the trainer..
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Sep 27, 2015 8:20 am    Post subject: Reply with quote

Sounds like your Lua code is screwed up. Can't help with what I can't see.
Back to top
View user's profile Send private message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Sun Sep 27, 2015 8:42 am    Post subject: Reply with quote

Zanzer wrote:
Sounds like your Lua code is screwed up. Can't help with what I can't see.


No, it's not screwed up. If you don't understand what i meant, I'll try to explain again. This code listed below, belongs to the buttons in my trainer, obviously w/different addresses. It changes the register of it. If I forexample click my "Noclip" button that script will execute and I will perfectly fine be able to walk through walls, objects.. but if I press another button while the noclip address is breakpointed by that script below the game just freezes, but if I press the noclip then manually go to memory view and change the register of forexample superjump manually then I won't crash, in other words, the code below only works on one address at time, if I want to do superjump I have to disable noclip first. But not if I change the registers manually, then I can do as many as the debugger supports.....

"function debugger_onBreakpoint()
EIP=0xADRESSHERE
debug_continueFromBreakpoint(co_run)
return 1
end

debug_setBreakpoint(0xADRESSHERE)
end"
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Sep 27, 2015 1:43 pm    Post subject: Reply with quote

The Lua code you posted looks pretty screwed up to me. Smile

Anyway, as Dark Byte told you in your other thread,
the latest debugger_onBreakpoint defined is called by ALL breakpoints you set.

You need to define a single debugger_onBreakPoint function that checks which breakpoint is executing.
Code:
function debugger_onBreakpoint()
  if EIP == SUPER_JUMP_ADDRESS then
    -- super jump code
  else if EIP == NOCLIP_ADDRESS then
    -- noclip code
  end
  debug_continueFromBreakpoint(co_run)
  return 1
end
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