Help
Remember Me?
Home
Forum
Download
Scripting docs
Wiki
Main
Special Pages
Books
Recent Changes
Blogs
Wiki
Main
CallPublic
This site has been archived and made available for preservation purposes. No edits can be made.
If this is your first visit, be sure to check out the
FAQ
by clicking the link above. You may have to
register
before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
article
discussion
source
history
Viewing source for:
CallPublic
Calls a public function. [h="2"] Declaration [/h] [highlight=cpp] VAULTSCRIPT VAULTSPACE Result (*VAULTAPI(CallPublic))(VAULTSPACE cRawString, ...) VAULTCPP(noexcept); [/highlight] [highlight=c] native CallPublic(const name{}, {Fixed,Float,_}:...); [/highlight] [h="2"] Parameters [/h] [b][wiki]cRawString[/wiki][/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"]Result[/wiki]. [h="2"] Usage example (C++) [/h] [highlight=cpp] Void VAULTSCRIPT exec() noexcept { // MagicFunction is a public function defined in some other script Result result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com"); } [/highlight] [h="2"] Usage example (PAWN) [/h] [highlight=c] main() { // MagicFunction is a public function defined in some other script new result = CallPublic("MagicFunction", 1, 2, "www.vaultmp.com"); } [/highlight] [h="2"] Related pages [/h] [list][*][wiki]MakePublic[/wiki] [/LIST] [category]VaultMP interface[/category] [category]Scripting functions[/category] [category]Misc functions[/category]