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 


Can't use label in AOB injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
boogiepoppu
How do I cheat?
Reputation: 0

Joined: 25 May 2020
Posts: 1
Location: United States

PostPosted: Mon May 25, 2020 8:31 am    Post subject: Can't use label in AOB injection Reply with quote

I'm kinda new to cheat engine and I'm trying to define a float, give it a label, and move that value into an address. But I keep getting this error message
"Error in line 21 (mov [rdx+4],[ffffffffffffffff]): This instruction can't be compiled"


Here's my script:

Code:

[ENABLE]

aobscanmodule(INJECT,UnityPlayer.dll,0F 29 1A A8 07 74 5E) // should be unique
alloc(newmem,$1000,"UnityPlayer.dll"+546267)

label(code)
label(return)
label(floatHeight)

newmem:
  code:
    movaps [rdx],xmm3
    mov [rdx+4],[floatHeight]
    test al,07
    jmp return

  floatHeight:
    dd (float)10.0

  INJECT:
    jmp newmem
    return:

registersymbol(INJECT)
registersymbol(floatHeight)

[DISABLE]

INJECT:
  db 0F 29 1A A8 07

unregistersymbol(INJECT)
dealloc(newmem)


What am I doing wrong? And why does my label evaluate to 'ffffffffffffffff?'
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 154

Joined: 06 Jul 2014
Posts: 4754

PostPosted: Mon May 25, 2020 10:17 am    Post subject: Reply with quote

fff... is just a placeholder while CE checks the syntax of your script.

There is no mov instruction that allows you to move from one address into another address. You have to use a register as an intermediary.
Code:
push rcx
mov ecx,[floatHeight]
mov [rdx+4],ecx
pop rcx

Also, your script should work fine without this, but you should put this before floatHeight:
Code:
align 4 CC
floatHeight:
  dd ...
Or just give floatHeight its own alloc.
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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