CLEO Help read_memory, Float values

CLEO related
Status
Not open for further replies.

m4nuel3

Member
Joined
Mar 14, 2013
Messages
16
Reaction score
0
I need to know how to make the read_memory's function return a float value...

For example... i have an address which includes coordinates to something...
If i use:
0A8D: 1@ = read_memory [ADDRESS] size 4 virtual_protect 0
It will return to me a 4 bytes integer value, but i needed a float value!
What could i do to resolve this problem? Thanks.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
0A8D: 1@ = read_memory [ADDRESS] size 4 virtual_protect 0
1@ is float already(if address returns float)
If you wanna use the value in a text or something use %f.
 

m4nuel3

Member
Joined
Mar 14, 2013
Messages
16
Reaction score
0
I have wanted to know if there was a way to convert a byte value to Floating point value like in cheat engine, because it is so usefull i'm studying now an algorithm to do this type of calculation, i don't really know if in cleo this is possible, now it's too late i need to go.

http://en.wikipedia.org/wiki/IEEE_floating-point_standard

http://gregstoll.dyndns.org/~gregstoll/floattohex/

Float values are different from bytes values, but the hex code remain always the same... that's why i don't understand how the script when it's running can return type of value in  each situation when it's needed... it can't return 2 type of values that's impossible, the script can't work with both (byte and/or float values), so is needed that we let "understand" to the script which type of value it have to return.
This can be explained with the 2 links that i've linked on top.
 
Status
Not open for further replies.
Top