 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
MixerMax How do I cheat?
Reputation: 0
Joined: 23 Aug 2009 Posts: 7
|
Posted: Tue Nov 19, 2013 9:45 pm Post subject: Invalid address for ReadMem? |
|
|
Hi all, I'm making a cheat for a flash game I'm playing.
This cheat overrides part of the code in a function to un randomize the obtained bonus.
I like keeping things clean & tidy (also I want to re randomize sometimes)
So I'm saving the original code, to recover it when disabling the cheat.
The cheat works aok, I confirmed it by adding the symbols to the cheatlist and I see how the "saved" and "active" code changes as it should.
But for some reason I keep getting this error message when I press the OK button:
Quote: | (Error in line 18 (readmem(mOldCode, 24)) :Invalid address for ReadMem) |
This is the code for the cheat, if anyone is able to pinpoint the problem and satiate my curiosity I'll be very grateful
The aob uses plenty of wildcards, specially where I'm modifying the code, since some of them are doubles and object properties, which changes each version.
It's also pretty long (156B), since I want to be sure I found the correct function (and make it fail if the function's structure was changed)
Code: | [ENABLE]
aobscan(_mCode, [aob here])
label(mCode)
registersymbol(mCode)
alloc(mOldCode, 24)
registersymbol(mOldCode)
mOldCode:
readmem(_mCode+78, 24)
_mCode+78:
mCode:
db d3 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
[DISABLE]
mCode:
readmem(mOldCode, 24)
unregistersymbol(mCode)
unregistersymbol(mOldCode)
dealloc(mOldCode) |
Thanks in advance!!
EDIT: Forgot to say: I'm using CheatEngine 6.3 x64
|
|
Back to top |
|
 |
SteveAndrew Master Cheater
Reputation: 30
Joined: 02 Sep 2012 Posts: 323
|
Posted: Wed Nov 20, 2013 12:16 am Post subject: |
|
|
hmm... I was unaware that Auto Assembler had such a feature available to it, but I've tested it an yes it does in fact work in the way you've shown...
I too received that message, at the time of editing the script I guess it can't seem to figure out what address it's supposed to call for the 'readmem' function. However if you just click okay force it to edit to to that, upon actually trying to enable it, it does in fact work! I tried it out for my assassins creed 4 health cheat I made.
It uses the 'readmem' function not only to disable the cheat, but to copy the original code into the script rather than hard coding it!
I see how this could be very useful in certain situations!
Code: |
//Assassin's Creed 4: Black Flag
//Infinite Health
//Steve Andrew
[enable]
alloc(InfiniteHealth,1024)
aobscan(HealthAddress,66 89 ? 5c 85 ff 79 ? 80)
label(OriginalCode)
registersymbol(HealthAddress)
registersymbol(OriginalCode)
InfiniteHealth:
mov ax,[esi+5e] //Thanks for offset ColdFusion73! ;)
OriginalCode:
readmem(HealthAddress,6)
jmp HealthAddress+6
HealthAddress:
jmp InfiniteHealth
nop
[disable]
HealthAddress:
readmem(OriginalCode,6)
//db 66 89 46 5c 85 ff
//mov [esi+5c],ax
//test edi,edi
dealloc(InfiniteHealth)
unregistersymbol(HealthAddress)
unregistersymbol(OriginalCode)
|
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 468
Joined: 09 May 2003 Posts: 25706 Location: The netherlands
|
Posted: Wed Nov 20, 2013 12:42 am Post subject: |
|
|
Yes, just force ce to use it. This error is because at the time the disable part is syntax checked, the symbol hasn't been registered yet
_________________
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 |
|
 |
MixerMax How do I cheat?
Reputation: 0
Joined: 23 Aug 2009 Posts: 7
|
Posted: Wed Nov 20, 2013 6:15 am Post subject: |
|
|
Dark Byte wrote: | Yes, just force ce to use it. This error is because at the time the disable part is syntax checked, the symbol hasn't been registered yet | Thought so, thanks a lot for confirming it !!
Tried registering a label instead of the var, and it doesn't recognize this either.
Guess the syntax check for functions params works differently than the one for assembly.
Is there (or will there be) a way to let the syntax checker know the symbol will exist at runtime?
I mean, it sure knows about label mCode
My OCD compels me to work something off to avoid the error message, and I really don't want to replace readMem with a bunch of mov
|
|
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
|
|