update doc

This commit is contained in:
Olivier Gagnon
2021-10-16 22:36:49 -04:00
parent c96c7e3d2e
commit c7c582e9fa
4 changed files with 59 additions and 5 deletions

View File

@@ -1,13 +1,13 @@
autocomplete() Netscript Function
============================
.. warning:: This feature is not officially supported yet and the API might change.
.. warning:: This feature is not officially supported yet and the API might change. It is also only supported in ns2
.. js:function:: autocomplete(data, args)
:RAM cost: 0 GB
:param Object data: general data about the game you might want to autocomplete.
:param string[] args: current arguments.
:param string[] args: current arguments. Minus `run script.ns`
data is an object with the following properties::
@@ -15,7 +15,10 @@ autocomplete() Netscript Function
servers: list of all servers in the game.
txts: list of all text files on the current server.
scripts: list of all scripts on the current server.
flags: the same flags function as passed with ns. Calling this function adds all the flags as autocomplete arguments
}
This function is special as it must be declared as a top level function like `main`.
Example: