This site has been archived and made available for preservation purposes. No edits can be made.

CallPublic

Calls a public function.

[top]Declaration

Code cpp:
VAULTSCRIPT VAULTSPACE Result (*VAULTAPI(CallPublic))(VAULTSPACE cRawString, ...) VAULTCPP(noexcept);
Code c:
native CallPublic(const name{}, {Fixed,Float,_}:...);

[top]Parameters

cRawString - the public name of the function
... - the arguments. Must match the parameter list of the public function.

[top]Return value

Returns a Result.

[top]Usage example (C++)

Code cpp:
Void VAULTSCRIPT exec() noexcept
{
    // MagicFunction is a public function defined in some other script
    Result result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com");
}

[top]Usage example (PAWN)

Code c:
main()
{
    // MagicFunction is a public function defined in some other script
    new result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com");
}

[top]Related pages