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-06-2012, 03:24 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,_}:...);
</code>

[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>
void VAULTSCRIPT exec()
{
// MagicFunction is a public function defined in some other script
vaultmp::Result result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com");
}
</code>

[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");
}
</code>

[top]Related pages