MEMORY
Write (primitives)
Writes a primitive value to memory.
Syntax
local ok = ONYX.Memory.WriteU32(address, value)Parameters
address(integer) — Address to write to.value(integer or number) — Value matching the function width and signedness.
Return(s)
boolean — true on success, false on failure.
Behavior
- Writers: WriteU8, WriteU16, WriteU32, WriteU64, WriteI8, WriteI16, WriteI32, WriteI64, WriteF32, WriteF64.
- If the target page is not writable, protection is changed, the value written, then the original protection restored.
Example(s)
ONYX.Memory.WriteU32(flagPtr, 0xCAFE)