bitburner-src/doc/source/netscript/codingcontractapi/getNumTriesRemaining.rst
MageKing17 ae15914efa Update netscript documentation.
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.
2021-07-06 00:18:22 -07:00

20 lines
656 B
ReStructuredText

getNumTriesRemaining() Netscript Function
=========================================
.. js:function:: getNumTriesRemaining(filename[, hostname=current hostname])
:RAM cost: 2 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: Number indicating how many attempts are remaining
Get the number of tries remaining on the contract before it
self-destructs.
Example:
.. code-block:: javascript
codingcontract.getNumTriesRemaining("contract-123.cct", "home"); // returns: 5