Updated readme.

This commit is contained in:
Marvin Blum
2015-10-28 19:20:23 +01:00
parent 755d5af263
commit ae8fad1abc

View File

@@ -121,6 +121,19 @@ var _x = add(1, 2);
// result in _x is 3 // result in _x is 3
``` ```
Functions support optional parameters by predefining them:
```
func add(_a = 0, _b = 0) {
return _a+_b;
}
// Call it:
var _x = add();
// result in _x is 0
```
### Call build in commands ### Call build in commands
To call SQF build in commands (like hint, getDir, addItem, ...) we have to use a different syntax. To call SQF build in commands (like hint, getDir, addItem, ...) we have to use a different syntax.