Skip to content

float_sto_set

Floating Point Numbers (XFL) Serialized Objects
  • Read a serialized floating point number.
  • If there are more fields/data after the serialized floating pointer number then ignore them.
  • Return it as an XFL enclosing number
int64_t float_sto_set (
uint32_t read_ptr,
uint32_t read_len
);
int64_t vault_pusd = float_sto_set(vault, 8);
if (vault_pusd < 0)
rollback("Failed to parse serialized float.", 33, 1);
NameTypeDescription
read_ptruint32_tPointer to a buffer contianing the serialized XFL. May be null.
read_lenuint32_tThe length of the buffer.
TypeDescription
int64_t

The number of bytes written to the output buffer.

If negative, an error:
NOT_AN_OBJECT
- the supplied buffer did not contain a valid serialized floating point number

OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.