Enfusion Script API
|
Module containing compiled scripts. More...
Public Member Functions | |
proto bool | Call (Class inst, string function, bool async, out void returnVal, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL) |
Dynamic call of function. | |
Static Public Member Functions | |
static proto ref ScriptModule | LoadScript (ScriptModule parentModule, string scriptFile) |
Load script and create ScriptModule for it. | |
static proto ref ScriptModule | CompileScript (ScriptModule parentModule, string text, out string errorText, out int errorLine) |
Create ScriptModule from string input. | |
Module containing compiled scripts.
proto bool ScriptModule.Call | ( | Class | inst, |
string | function, | ||
bool | async, | ||
out void | returnVal, | ||
void | param1 = NULL, | ||
void | param2 = NULL, | ||
void | param3 = NULL, | ||
void | param4 = NULL, | ||
void | param5 = NULL, | ||
void | param6 = NULL, | ||
void | param7 = NULL, | ||
void | param8 = NULL, | ||
void | param9 = NULL ) |
Dynamic call of function.
when inst == NULL
, it's global function call, otherwise it's method of class. If async
is true
, creates new thread (so it's legal to use sleep/wait). Otherwise main thread is used and call is blocking. Return value of called method is returned via returnVal
(only when async
is false!) Returns true
, when success.
|
static |
Create ScriptModule from string input.
Available in developer builds (workbench or diag) and in headless server.
parentModule | Module |
text | to compile |
errorText | output from compiler |
errorLine | output from compiler |
|
static |
Load script and create ScriptModule for it.
Available in developer builds (workbench or diag) and in headless server.
parentModule | Module |
scriptFile | Script file path |