bitburner-src/doc/source/netscript/advancedfunctions/atExit.rst

19 lines
348 B
ReStructuredText
Raw Normal View History

2021-10-15 02:13:26 +02:00
atExit() Netscript Function
============================
.. js:function:: atExit(f)
:RAM cost: 0 GB
:param function f: function to call when the script dies.
Runs when the script dies.
Example:
.. code-block:: javascript
function onDeath() {
console.log('I died!!!')
}
atExit(onDeath);