mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
work to make documentation unified.
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
getData() Netscript Function
|
||||
============================
|
||||
|
||||
.. js:function:: getData(fn[, hostname/ip=current ip])
|
||||
.. js:function:: getData(filename[, hostname=current hostname])
|
||||
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
:param string filename: Filename of the contract
|
||||
:param string hostname: Hostname of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
:returns: The specified contract's data. Different data type depending on
|
||||
contract type.
|
||||
|
||||
Get the data associated with the specific Coding Contract. Note that this is
|
||||
not the same as the contract's description. This is just the data that
|
||||
the contract wants you to act on in order to solve
|
||||
|
||||
:returns: The specified contract's data
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
data = codingcontract.getData("contract-123.cct", "home");
|
||||
answer = solve(data);
|
||||
codingcontract.attempt(answer, "contract-123.cct", "home");
|
||||
Reference in New Issue
Block a user