Skip to main content
Pointer wraps a single memory address. You get one from ptr(), from Memory.scan(), or by following another pointer - and then use it to navigate and read game memory.
.address is always a BigInt (0n, 0x12345678n, etc.). All methods accept number, BigInt, or another Pointer as an address argument - the engine converts automatically.

Overview

Arithmetic

Offset and compare pointers with add, sub, and equals.

Dereference

Follow a pointer to get the value it points to.

Resolve

Walk multi-level pointer chains in one call.

Read

Read typed scalars, strings, arrays, or raw byte snapshots.

Properties


Creating a pointer

Both forms are equivalent. ptr() is the idiomatic shorthand in scripts.

Pointer.null

A pre-built null pointer - use it as a sentinel or default value.

Arithmetic

.add


Returns a new Pointer shifted forward by offset bytes. The original is not modified.

.sub


Returns a new Pointer shifted backward by offset bytes.

.equals


Returns true if both pointers point to the same address.

Dereference

.deref / .derefRaw


Reads a pointer-sized value from this address and returns it as a new Pointer. Use deref in most cases - derefRaw forces a live read.
Cached vs raw - deref reads through the SDK cache (fast, data is up-to-date within a frame). derefRaw always hits process memory directly. Prefer cached reads in per-frame code.

Resolve

.resolve / .resolveRaw


Walks a multi-level pointer chain. For each offset except the last, adds the offset then dereferences. The final offset is only added - not dereferenced. Equivalent to writing a chain of add + deref calls manually.
If any intermediate pointer in the chain is null, resolve throws "Pointer.resolve: null in chain". Check .isNull on the result when the chain might not exist yet.

Read

.read / .readRaw


readRaw mirrors every overload but bypasses the cache.
Reads that fail (bad address, access denied) throw an error. Check .isNull before reading from a pointer you’re not sure about.

Type names


Snapshot

Snapshot is what .read(byteCount) returns - a frozen copy of raw bytes together with helpers to interpret them.

Accessor

.at(offset) returns an object whose getter properties decode bytes in-place:

Recipes

Follow a pointer chain and read a field

Read multiple fields from one snapshot

Null-safe pointer walk