CallFunc
From Liberty Unleashed Wiki
This function will call a function from another loaded script.
Syntax
CallFunc( string scriptPath, string funcName, params )
Arguments
- scriptPath - The path of the script including the folder and filename
- funcName - The function being called
- params - Any parameters which need to be passed
Example
This example will call a function from Scripts/SomeScript/main.nut when a player types /somecmd.
function onPlayerCommand( id, cmd, text ) { if ( cmd == "somecmd" ) { CallFunc( "Scripts/SomeScript/main.nut", "SomeFunction", "param1", 2 ); } return 1; }
Notes
The function onPlayerCommand is used in in this example. More info about them in corresponding pages.