|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
bmmlst310 How do I cheat? Reputation: 0
Joined: 22 Sep 2023 Posts: 8
|
Posted: Tue Mar 19, 2024 6:46 am Post subject: Confusion about label & symbol |
|
|
Have done an easy script, but when I use 'label' for my address, it would say "INJECT Error:Not all results found" and then game would crash if I triggered relevant action.
Code: | aobscanmodule(INJECT,HWR.exe,5C 00 90 0F B7 C5 90 F3 0F 11 44 24 1C 8B 4C 24 1C 81 F1) // should be unique
alloc(newmem,$1000)
alloc(mag,4)
label(code)
label(return)
label(mag)
mag:
dd (float)1
newmem:
movss xmm0,[mag]
jmp code
code:
movss [esp+1C],xmm0
jmp return
INJECT+06:
jmp newmem
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT+06:
db F3 0F 11 44 24 1C
unregistersymbol(INJECT)
dealloc(newmem)
|
Then I changed to use 'registersymbol', it worked well. Why is that?
PS: I didn't use 'mag' outside the script. The only thing I triggered was this script.
Code: | aobscanmodule(INJECT,HWR.exe,5C 00 90 0F B7 C5 90 F3 0F 11 44 24 1C 8B 4C 24 1C 81 F1) // should be unique
alloc(newmem,$1000)
alloc(mag,4)
label(code)
label(return)
mag:
dd (float)1
newmem:
movss xmm0,[mag]
jmp code
code:
movss [esp+1C],xmm0
jmp return
INJECT+06:
jmp newmem
nop
return:
registersymbol(INJECT mag)
[DISABLE]
INJECT+06:
db F3 0F 11 44 24 1C
unregistersymbol(INJECT mag)
dealloc(newmem)
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 459
Joined: 09 May 2003 Posts: 25320 Location: The netherlands
|
Posted: Tue Mar 19, 2024 7:31 am Post subject: |
|
|
when you use alloc you must not use label on the same symbol
because you used label(mag) the alloc got erased. and since there's no address specifier before mag: mag will be put at address 00000000, which is not valid. so when the game accesses mag (address 00000000) it'll crash
_________________
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 |
|
|
bmmlst310 How do I cheat? Reputation: 0
Joined: 22 Sep 2023 Posts: 8
|
Posted: Tue Mar 19, 2024 7:57 am Post subject: |
|
|
Dark Byte wrote: | when you use alloc you must not use label on the same symbol
because you used label(mag) the alloc got erased. and since there's no address specifier before mag: mag will be put at address 00000000, which is not valid. so when the game accesses mag (address 00000000) it'll crash |
I see. I did found the address 00000000 but not paid much attentino to it. Thank you very much for your prompt reply.
|
|
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
|
|