  | 
				
				Cheat Engine The Official Site of Cheat Engine   
				
 
				 | 
			 
		 
		 
	
		| View previous topic :: View next topic   | 
	 
	
	
		| Author | 
		Message | 
	 
	
		buyx86 Advanced Cheater
  Reputation: 0
  Joined: 10 May 2011 Posts: 82 Location: Philippines
  | 
		
			
				 Posted: Sat Mar 30, 2024 7:01 pm    Post subject: Game crash after moving working script to main | 
				       | 
			 
			
				
  | 
			 
			
				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 | 
		 | 
	 
	
		  | 
	 
	
		ParkourPenguin I post too much
  Reputation: 152
  Joined: 06 Jul 2014 Posts: 4706
 
  | 
		
			
				 Posted: Sun Mar 31, 2024 12:07 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | 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 | 
		 | 
	 
	
		  | 
	 
	
		buyx86 Advanced Cheater
  Reputation: 0
  Joined: 10 May 2011 Posts: 82 Location: Philippines
  | 
		
			
				 Posted: Sun Mar 31, 2024 2:16 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				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 | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
	 
	    
	   | 
	
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
  | 
   
 
		 |