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 


Game crash after moving working script to main

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials
View previous topic :: View next topic  
Author Message
buyx86
Advanced Cheater
Reputation: 0

Joined: 10 May 2011
Posts: 82
Location: Philippines

PostPosted: Sat Mar 30, 2024 7:01 pm    Post subject: Game crash after moving working script to main Reply with quote

After getting a script to work without a unique AOB by watching youtube videos, I was ready to merge it with my main script. It was working by itself as a standalone script, but after the merge, the game keeps crashing.

This is the standalone script:
Code:

[ENABLE]
aobscanmodule(MOOD,Sys43VM.DLL,03 C8 13 FA 85 FF) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  cmp [ebx+18],32
  jne code
  mov [ebx],7
  mov eax,[esi+00000210]
  jmp return

code:
  mov [ebx],ecx
  mov eax,[esi+00000210]
  jmp return

MOOD+38:
  jmp newmem
  nop 3
return:
registersymbol(MOOD)

[DISABLE]

MOOD+38:
  db 89 0B 8B 86 10 02 00 00

unregistersymbol(MOOD)
dealloc(newmem)


And this is its counterpart in my main script that crashes the game after activating it:
Code:

[ENABLE]
aobscanmodule(SET3,Sys43VM.DLL,03 C8 13 FA 85 FF)
alloc(newmem3,$1000)
alloc(enableMaxMood,4)
label(codeSET3)
label(returnSET3)
enableMaxMood:
  dd 0
newmem3:
  cmp [enableMaxMood],0
  jz codeSET3
  cmp [eax+18],32
  jne codeSET3
  mov [ebx],7
  mov eax,[esi+00000210]
  jmp returnSET3

codeSET3:
  mov [ebx],ecx
  mov eax,[esi+00000210]
  jmp returnSET3

SET3+38:
  jmp newmem3
  nop 3
returnSET3:
registersymbol(SET3)

registersymbol(enableMaxMood)

[DISABLE]
SET3+38:
  db 89 0B 8B 86 10 02 00 00
unregistersymbol(enableMaxMood)
unregistersymbol(SET3)
dealloc(newmem3)
dealloc(enableMaxMood)


I don't understand how this is crashing the game when it was just a simple copy/paste work.
Back to top
View user's profile Send private message Yahoo Messenger
ParkourPenguin
I post too much
Reputation: 147

Joined: 06 Jul 2014
Posts: 4570

PostPosted: Sun Mar 31, 2024 12:07 am    Post subject: Reply with quote

Code:
newmem:
  cmp [ebx+18],32
Code:
newmem3:
  ...
  cmp [eax+18],32
ebx vs eax
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
buyx86
Advanced Cheater
Reputation: 0

Joined: 10 May 2011
Posts: 82
Location: Philippines

PostPosted: Sun Mar 31, 2024 2:16 am    Post subject: Reply with quote

Woa...didn't notice that. HAHAHAHA

Maybe it's because I didn't copy/paste everything and typed the others manually. I mistyped it without noticing. Thanks a lot. You always come through for me ParkourPenguin.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials 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