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 


Memory float storing

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

Joined: 07 Feb 2018
Posts: 4

PostPosted: Wed Feb 07, 2018 6:54 am    Post subject: Memory float storing Reply with quote

I need to store a float value in a temporary memory to read later, and i need that a instruction keep changing this memory value.

I tried:
Code:
alloc(tempf,4)
alloc(updatef,30)
alloc(readf,30)
label(return)
label(return2)

tempf:
 dd (float)2 // Just to hold until the first update
 registersymbol(tempf)

updatef:
  fstp dword ptr [eax+0D]
  mov [tempf], [eax+0D]
  jmp return

readf:
  mov [eax+00000118],[tempf]
  jmp return2


Removed the [DISABLE] and the part where i change the current memory to updatef and readf.

When i try to confirm the script like this, i get the error saying [tempf] is 00000000. Help please.
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Wed Feb 07, 2018 6:59 am    Post subject: Reply with quote

Code:
mov [tempf], [eax+0D]

cant move two memory location operands.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
nullentity
How do I cheat?
Reputation: 0

Joined: 07 Feb 2018
Posts: 4

PostPosted: Wed Feb 07, 2018 7:05 am    Post subject: Reply with quote

And thats it? Isnt there any way?
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Wed Feb 07, 2018 7:12 am    Post subject: Reply with quote

Code:
mov eax,[eax+0D]
mov [tempf],eax


this is invalid
mov [eax+00000118],[tempf]
Code:
mov eax,[tempf]
mov [eax+00000118],eax


also dont use tiny allocs, just allocate the mem and separate your stuff.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.


Last edited by OldCheatEngineUser on Wed Feb 07, 2018 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Wed Feb 07, 2018 7:16 am    Post subject: Reply with quote

Code:
alloc(tempf,4)
alloc(updatef,30)
alloc(readf,30)
label(return)
label(return2)

tempf:
 dd (float)2 // Just to hold until the first update
 registersymbol(tempf)

updatef:
  fstp dword ptr [eax+0D]
  push ecx
  mov ecx,[eax+0D]
  mov [tempf],ecx
  pop ecx
  jmp return

readf:
  push ecx
  mov ecx,[eax+118]
  mov [tempf],ecx
  pop ecx
  jmp return2


or

Code:
alloc(tempf,4)
alloc(updatef,30)
alloc(readf,30)
label(return)
label(return2)

tempf:
 dd (float)2 // Just to hold until the first update
 registersymbol(tempf)

updatef:
  fstp dword ptr [eax+0D]
  fld dword ptr [eax+0D]
  fstp dword ptr [tempf]
  jmp return

readf:
  fld dword ptr [eax+118]
  fstp dword ptr [tempf]
  jmp return2

_________________
Back to top
View user's profile Send private message Visit poster's website
nullentity
How do I cheat?
Reputation: 0

Joined: 07 Feb 2018
Posts: 4

PostPosted: Wed Feb 07, 2018 7:23 am    Post subject: Reply with quote

All of them worked. Thanks guys!
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 Tutorials -> Auto Assembler 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