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

CallPublic

This is an old revision of this page, as edited 04-26-2012, 09:42 PM by foxtacles (contribs). It may differ significantly from the current revision.
Calls a public function.

[top]Declaration

Code cpp:
VAULTSCRIPT vaultmp::Result (*CallPublic)(std::string, ...);
native CallPublic(const name{}, {Fixed,Float,_}:...);

[top]Parameters

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

[top]Return value

Returns a vaultmp::Result.

[top]Usage example (C++)

Code cpp:
vaultmp::Void VAULTSCRIPT exec()
{
    // MagicFunction is a public function defined in some other script
    vaultmp::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