Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507
natives.startNewScript - GTA Connected

natives.startNewScript

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0
void natives.startNewScript(string scriptName, int stackSize)
The natives.startNewScript function is used to Starts a new script that has been requested and loaded.

Parameters

1) string scriptName Name of the script to start.
2) int stackSize Size of the stack memory to allocate (default ~1024).

Return

void This function doesn't return a value.

Notes

Examples

Example 1 - JavaScript:

bindEventHandler("OnResourceReady", thisResource, function() {
    // Start the "trafficControl" script with a stack size of 2048
    natives.startNewScript("trafficControl", 2048);
});

Compatibility

There isn't any compatibility information for this function.