Call

Category: Script / Function call
Since engine version: 1.0 OC (extended in 4.0 OC)

Description

Calls the specified function. If given a string, the function is looked up in the context object (this). For example, obj->Call("Foo") is the same as obj->Foo(). Using Call like this is primarily useful when the name of the function can vary. If "~" is prepended to the function name then the call does not fail if the function does not exist.

Syntax

any Call(string or function function, any ...);

Parameters

function:
Function to be called.
...:
Parameters of the function.
See also: GameCall, eval
jwk, 2002-04
Günther, 2012