exportFunction

Revision as of 15:13, 27 April 2020 by Vortrex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0

void exportFunction(string name, function Function)

The exportFunction function is used to export a function so it can be used in other resources.

Parameters

1) string name The name of the exported function.
2) function Function The function to export.

Return

void This function doesn't return a value.

Notes

Examples

Example 1 - JavaScript:

bindEventHandler("OnResourceStart", thisResource, function(event, resource) {

   exportFunction("testFunc", testFunc);

});

function testFunc(foo, bar) {

   return true;

}

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

        exportFunction

        reflection.call
        reflection.clone
        reflection.createFunction
        reflection.move
        reflection.tostring


Client Related

        exportFunction

        reflection.call
        reflection.clone
        reflection.createFunction
        reflection.move
        reflection.tostring