mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
ae15914efa
Unfortunately, I haven't used most of the specialty APIs yet, so I'm not intimately familiar with where their documentation might be wrong. I figured some fixes were better than no fixes, and I can always make more fixes later. Fixes #1023.
24 lines
861 B
ReStructuredText
24 lines
861 B
ReStructuredText
getData() Netscript Function
|
|
============================
|
|
|
|
.. js:function:: getData(filename[, hostname=current hostname])
|
|
|
|
:RAM cost: 5 GB
|
|
: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.
|
|
|
|
Example:
|
|
|
|
.. code-block:: javascript
|
|
|
|
data = codingcontract.getData("contract-123.cct", "home");
|
|
answer = solve(data);
|
|
codingcontract.attempt(answer, "contract-123.cct", "home");
|