SplitScript reference / Process / read

Process.read

Method

Process.read<T>(address: address) -> T! where T: MemoryReadable

Reads a fixed-layout value from process memory.

The expected MemoryReadable type selects a fixed-size primitive or record layout. A synchronous read returns T!; retry polls until a value is available and yields T. Use an explicit type argument such as process.read<i32> when context cannot determine the type.

Parameters

  • address: The target address to read.

Effects: reads process memory, requires an attached process

Runtime behavior: available while a process is attached, except in onDetach; synchronous

Examples

Read a typed value

let health = process.read<i32>(player.offset(0x20)) else 0