StoreToAddress Function

Store up to 4 bytes to a memory address.

void StoreToAddress(Address addr, any data, NumberType size, bool updateMemAccess)

Parameters

Address addr

Address to a memory location.

any data

Value to store at the address.

NumberType size

How many bytes should be written. If storing a floating-point value, use NumberType_Int32.

bool updateMemAccess

If true, SourceMod will set read / write / exec permissions on the memory page being written to.

Errors

Address is null or pointing to reserved memory.