MEMORY

Call

Calls a function at the given address with arguments.

Syntax

local result = ONYX.Memory.Call(address, signature, ...)

Parameters

  • address (integer) — Function address.
  • signature (string) — Format "<return><args>", one character per type.
  • ... (values) — Arguments matching the signature types.

Return(s)

Depends on the return type in the signature; void returns nothing.

Behavior

  • Type characters: v void, i int32, l int64, b bool, f float, d double, p pointer (integer, nil = 0), s string (const char*).
  • The character before the colon is the return type; the rest are argument types (max 16).
  • Uses the x64 calling convention.

Example(s)

local value = ONYX.Memory.Call(address, "i:f", 1.0)
local text = ONYX.Memory.Call(getter, "p:f", 1.0, 2.0)