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

CallPublic

(Difference between revisions)
Return to current revision
  1. +
    Calls a public function.
    [h="2"] Declaration [/h]
    <code cpp>
    VAULTSCRIPT vaultmp::Result (*CallPublic)(std::string, ...);
    native CallPublic(const name{}, {Fixed,Float,_}:...);
    </code>
    [h="2"] Parameters [/h]
    [b]name[/b] - the public name of the function
    [b]...[/b] - the arguments. Must match the parameter list of the public function.
    [h="2"] Return value [/h]
    Returns a [wiki="Result"]vaultmp::Result[/wiki].
    [h="2"] Usage example (C++) [/h]
    <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>
    [h="2"] Usage example (PAWN) [/h]
    <code c>
    main()
    {
    // MagicFunction is a public function defined in some other script
    new result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com");
    }
    </code>
    [h="2"] Related pages [/h]
    [list][*][wiki]MakePublic[/wiki]
    [/LIST]
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]