Category:VBS: Scripting Functions
The function library adds a range of additional functions for use in scripts. These are not scripting commands, but rather sub-routines created with existing script commands (background info).
The VBS2 function library supersedes the old VBS1 Functions, although it is possible to re-load those functions for backwards compatibility with VBS1 scripts (see the VBS1 Functions article for more info).
In some limited builds of VBS2 (such as VBS2 Lite) some scripting functions may not be available. A popup error will appear when using a function that is not available.
The following line shows a typical call syntax:
_returnvalue = [parameters] call functionName;
A testing method, to check for a function's presence, is documented here.
See also: Category:VBS: Scripting Commands
- The function library can only be utilized in SQF scripts (i.e. a script that is loaded via preprocessFile or execVM).
It cannot be used in init lines, triggers, waypoints, the debug console or SQS scripts.
- The following line must be added to the top of every script in which a call to a library functions is performed:
- Function names are case sensitive.
Incorrect casing will result in no value being returned, and no errors being displayed.
(i.e. fn_vbs_relPos will work, fn_vbs_RelPos will NOT!)
- Functions can be called from any location that script commands can be executed from (e.g. init lines, triggers, etc).
- No include call is needed.
- Function names are not case-sensitive.
Pages in category "VBS: Scripting Functions"
The following 329 pages are in this category, out of 329 total.