Write Float to memory
Hello, so far ive been saving integer to memory like this:
But today i tried to save float to the cheat engine tutorial( the 3rd test from the tutorial, the one that has health as float) and i cant get the float value to save correctly, i always get a -4,-2, etc. Ive tried it like this
Im sending 98.888 as the float number
Why its not working with float but with int works just fine? From a programmer point of view aren't they doing the same thing, copy from a source to a destionation, but instead of int its using float
Code:
RtlCopyMemory( //routine copies the contents of a source memory block to a destination memory block. INT POINTER TO ADDRESS, //A pointer to the destination memory block to copy the bytes to. INT POINTER WITH NUMBERS, //A pointer to the source memory block to copy the bytes from. sizeof(INT) //The number of bytes to copy from the source to the destination. );
Code:
RtlCopyMemory( //routine copies the contents of a source memory block to a destination memory block. INT POINTER TO ADDRESS, //A pointer to the destination memory block to copy the bytes to. FLOAT POINTER WITH NUMBERS, //A pointer to the source memory block to copy the bytes from. sizeof(FLOAT) //The number of bytes to copy from the source to the destination. );
Why its not working with float but with int works just fine? From a programmer point of view aren't they doing the same thing, copy from a source to a destionation, but instead of int its using float
